|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML Question
Title: RE: XML Question You're welcome Saurabh. I have not examined the example you provided for accuracy - but I believe your question is: "how can I reference a schema from within an XML instance document?". There are 2 methods for doing so - which method you use depends on whether or not the schema to which the XML instance document validates has a target namespace. If the schema
does not have a target namespace, the root element of the XML instance document
will look as follows: <SomeRootElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation= "SomeSchema.xsd"> -- where "SomeSchema.xsd" is the name/location of the schema to which the XML instance document validates.. If the schema has a target namespace, the
root element of the XML instance document will look as
follows: <SomeRootElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sometargetnamespace.org" "SomeSchema.xsd">-- where "http://www.sometargetnamespace.org/" is the target namespace of the schema "SomeSchema.xsd".Hope that helps, Joe
Chiusano LMI **************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








