Inline XSD schema into an XML document

Jacuma

New Member
I wondering if there's a way to define xsd schema directly into an xml document.I see somthing like this write on MSXML \[code\]<?xml version="1.0"?><catalog xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:x="urn:book"> <!-- START OF SCHEMA --><xsd:schema targetNamespace="urn:book"> <xsd:element name="book"> <xsd:complexType> <xsd:sequence> <xsd:element name="author" type="xsd:string"/> <xsd:element name="title" type="xsd:string"/> <xsd:element name="genre" type="xsd:string"/> <xsd:element name="price" type="xsd:float"/> <xsd:element name="publish_date" type="xsd:date"/> <xsd:element name="description" type="xsd:string"/> </xsd:sequence> <xsd:attribute name="id" type="xsd:string"/> </xsd:complexType> </xsd:element></xsd:schema><!-- END OF SCHEMA --> <x:book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </x:book></catalog>\[/code\]There's something like in standard XML ? Just to present you the context, I've got a code that dynamicaly create an XML and his XSD and sent the XML through a one stream. So my goal is to provide the XML with his schema at the same time.Any ideas ? Is it possible ? Or the schema MUST be web accessible before sent my XML through my stream ?Thanks for your help.
 
Back
Top