Re: XML Schema embedded in XML document

Ken Chin <Kenneth.Chin@oracle.com> writes:

> Is it possible to embed XML Schema definitions in an XML document
> similar to DTDs?

In principle, yes.

In practice, implementations differ.

Next release of XSV will support things such as the following:

<envelop>
 <purchaseOrder orderDate="1999-10-20"
                xmlns="http://www.example.org/po"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://www.example.org/po #local">
   . . .
 </purchaseOrder>
 <xs:schema id="local" xmlns:xs="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.example.org/po"
            xmlns="http://www.example.org/po"
            elementFormDefault="qualified">

 <xs:element name="purchaseOrder" type="PurchaseOrderType"/>

 . . .

 </xs:schema>

</envelop>

-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Received on Monday, 30 June 2003 17:53:04 UTC