55namespace SimpleSAML \XMLSchema \XML ;
66
77use DOMElement ;
8+ use SimpleSAML \XPath \XPath ;
89use SimpleSAML \XML \Assert \Assert ;
9- use SimpleSAML \XML \Constants as C ;
10+ use SimpleSAML \XML \Constants as C_XML ;
1011use SimpleSAML \XML \{SchemaValidatableElementInterface , SchemaValidatableElementTrait };
1112use SimpleSAML \XML \Type \LangValue ;
12- use SimpleSAML \XML \ Utils \ XPath ;
13+ use SimpleSAML \XMLSchema \ Constants as C_XS ;
1314use SimpleSAML \XMLSchema \Exception \{InvalidDOMElementException , SchemaViolationException };
1415use SimpleSAML \XMLSchema \Type \{AnyURIValue , IDValue , StringValue , TokenValue };
1516use SimpleSAML \XMLSchema \Type \Schema \{BlockSetValue , FormChoiceValue , FullDerivationSetValue };
@@ -32,7 +33,7 @@ final class Schema extends AbstractOpenAttrs implements SchemaValidatableElement
3233
3334 /** The exclusions for the xs:anyAttribute element */
3435 public const XS_ANY_ATTR_EXCLUSIONS = [
35- [C ::NS_XML , 'lang ' ],
36+ [C_XML ::NS_XML , 'lang ' ],
3637 ];
3738
3839
@@ -75,14 +76,14 @@ public function __construct(
7576 protected ?LangValue $ lang = null ,
7677 array $ namespacedAttributes = [],
7778 ) {
78- Assert::maxCount ($ topLevelElements , C ::UNBOUNDED_LIMIT );
79+ Assert::maxCount ($ topLevelElements , C_XML ::UNBOUNDED_LIMIT );
7980 Assert::allIsInstanceOfAny (
8081 $ topLevelElements ,
8182 [XsInclude::class, Import::class, Redefine::class, Annotation::class],
8283 SchemaViolationException::class,
8384 );
8485
85- Assert::maxCount ($ schemaTopElements , C ::UNBOUNDED_LIMIT );
86+ Assert::maxCount ($ schemaTopElements , C_XML ::UNBOUNDED_LIMIT );
8687 Assert::allIsInstanceOfAny (
8788 $ schemaTopElements ,
8889 [
@@ -280,7 +281,7 @@ public static function fromXML(DOMElement $xml): static
280281 foreach ($ beforeSchemaTopElements as $ node ) {
281282 /** @var \DOMElement $node */
282283 if ($ node instanceof DOMElement) {
283- if ($ node ->namespaceURI === C ::NS_XS && array_key_exists ($ node ->localName , $ beforeAllowed )) {
284+ if ($ node ->namespaceURI === C_XS ::NS_XS && array_key_exists ($ node ->localName , $ beforeAllowed )) {
284285 $ topLevelElements [] = $ beforeAllowed [$ node ->localName ]::fromXML ($ node );
285286 }
286287 }
@@ -327,14 +328,14 @@ public static function fromXML(DOMElement $xml): static
327328 foreach ($ afterSchemaTopElements as $ node ) {
328329 /** @var \DOMElement $node */
329330 if ($ node instanceof DOMElement) {
330- if ($ node ->namespaceURI === C ::NS_XS && array_key_exists ($ node ->localName , $ afterAllowed )) {
331+ if ($ node ->namespaceURI === C_XS ::NS_XS && array_key_exists ($ node ->localName , $ afterAllowed )) {
331332 $ schemaTopElements [] = $ afterAllowed [$ node ->localName ]::fromXML ($ node );
332333 }
333334 }
334335 }
335336
336- $ lang = $ xml ->hasAttributeNS (C ::NS_XML , 'lang ' )
337- ? LangValue::fromString ($ xml ->getAttributeNS (C ::NS_XML , 'lang ' ))
337+ $ lang = $ xml ->hasAttributeNS (C_XML ::NS_XML , 'lang ' )
338+ ? LangValue::fromString ($ xml ->getAttributeNS (C_XML ::NS_XML , 'lang ' ))
338339 : null ;
339340
340341 return new static (
0 commit comments