sch:ns

Specification of a namespace prefix and URI. NOTE:<br/>Because the
characters allowed as names may change in versions of XML subsequent to W3C XML 1.0, the
RELAX NG Compact schema for Schematron does not constrain the prefix to particular
characters. In an ISO Schematron schema, namespace prefixes in context expressions,
assertion tests and other query expressions should use the namespace bindings provided by
this element. Namespace prefixes should not use the namespace bindings in scope for element
and attribute names.

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
prefix sch:nameValue required
The required prefix attribute is an XML name with no colon character.
uri sch:uriValue required
The required uri attribute is a namespace URI.
Wildcard: ANY attribute from ANY namespace OTHER than 'http://purl.oclc.org/dsdl/schematron'

Used By

Element sch:schema

Source

<xs:element name="ns">
  <xs:annotation>
    <xs:documentation>Specification of a namespace prefix and URI. NOTE:
      <br/>Because the characters allowed as names may change in versions of XML subsequent to W3C XML 1.0, the RELAX NG Compact schema for Schematron does not constrain the prefix to particular characters. In an ISO Schematron schema, namespace prefixes in context expressions, assertion tests and other query expressions should use the namespace bindings provided by this element. Namespace prefixes should not use the namespace bindings in scope for element and attribute names.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:attribute name="uri" use="required" type="sch:uriValue">
      <xs:annotation>
        <xs:documentation>The required uri attribute is a namespace URI.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="prefix" use="required" type="sch:nameValue">
      <xs:annotation>
        <xs:documentation>The required prefix attribute is an XML name with no colon character.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attributeGroup ref="sch:foreign-empty"/>
  </xs:complexType>
</xs:element>

Sample