[Home] [By Thread] [By Date] [Recent Entries]
As Michael Kay suggested, I am trying to my my XSLT schema aware. However, I
am somewhat confused about how namespaces are identifies and placed in
schemas and how that relates to instances. Take the simple schema in Listing
1 and an instance of it in Listing 2. Consider a namespace prefix of "ko"
and a locator of "www.knihtisk.org". I think I understand (but am not sure)
how it is presented in the instance (see listing 2) , but do not know how
the namespace is related to (presented in) the schema.
Any help appreciated, Mark
<xs:element name="WapperAroundAllButGlobals">
<xs:complexType>
<xs:sequence>
<xs:element name="One" type="xs:string"/>
<xs:element ref="Global"/>
</xs:sequence>
</xs:complexType>
</xs:element> <xs:element name="Global">
<xs:complexType>
<xs:sequence>
<xs:element name="Two" type="xs:string"/>
<xs:element name="Three" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element></xs:schema> Listing 2 <?xml version="1.0" encoding="UTF-8"?> <WapperAroundAllButGlobals xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ko=http:/www.knihtisk.org> <One>stuff</One> <Global> <Two>more stuff</Two> <Three>yet even more stuff</Three> </Global> </WapperAroundAllButGlobals>
|

Cart



