[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: simple xml question

  • From: Jeff Rafter <jeffrafter@e...>
  • To: Howard.Kidd@s...
  • Date: Fri, 16 Mar 2001 12:48:16 -0800

howard kidd
Howard,

It seems that everyone is too busy with "a simple guy with a simple problem"
to actually answer genuine-- read: non-academic-- problems in the XML
community.

Based on your original mail I am going to *guess* you are using Microsoft's
XML parser as you alluded to "XMLDOM"-- I could be wrong though.  Yes,
loading your document and schema into this parser will work-- however MSXML
does not support "W3C XML Schemas" it supports XDR (XML Data, reduced).  So
it will not treat the schema as a schema per se and can do no validation.

If you would like to use W3C XML Schemas, as you noted in the second mail,
you will have to use a different parser, and remember that the XML Schema
spec. is still under development.  Finding parsers which support it is tough
because people are waiting for it to be finished-- your best bets are to use
XSV [1] in Python or Xerces [2] in Java or the Oracle Schema Validator [3]
in Java.

If you can give me some more specifics (language and platform) I can be of
more help.

[1] http://www.w3.org/2000/09/webdata/xsv
[2] http://xml.apache.org/xerces-j
[3] http://otn.oracle.com/tech/xml

for more check:

http://www.w3.org/XML/Schema#tools

Good luck,
Jeff Rafter
Defined Systems

----- Original Message -----
From: <Howard.Kidd@s...>
To: <xml-dev@l...>
Sent: Friday, March 16, 2001 2:12 AM
Subject: simple xml question


> I am a virgin xml user and having a bit or trouble with what I believe
> must be a simple process
>
>
> If I take this sample xml straight from the w3 sebsite
>
> <<<<
> <?xml version="1.0"?>
> <shipOrder>
>   <shipTo>
>     <name>Tove Svendson</name>
>     <street>Ragnhildvei 2</street>
>     <address>4000 Stavanger</address>
>     <country>Norway</country>
>   </shipTo>
>   <items>
>     <item>
>       <title>Empire Burlesque</title>
>       <quantity>1</quantity>
>       <price>10.90</price>
>     </item>
>     <item>
>       <title>Hide your heart</title>
>       <quantity>1</quantity>
>       <price>9.90</price>
>     </item>
>   </items>
> </shipOrder>
> >>
>
> and get the schema from the same website
> <<
> <xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">
>
> <xsd:element     name="shipOrder" type="order"/>
>
> <xsd:complexType name="order">
>   <xsd:element   name="shipTo"    type="shipAddress"/>
>   <xsd:element   name="items"     type="cdItems"/>
> </xsd:complexType>
>
> <xsd:complexType name="shipAddress">
>   <xsd:element   name="name"      type="xsd:string"/>
>   <xsd:element   name="street"    type="xsd:string"/>
>   <xsd:element   name="address"   type="xsd:string"/>
>   <xsd:element   name="country"   type="xsd:string"/>
> </xsd:complexType>
>
> <xsd:complexType name="cdItems">
>   <xsd:element   name="item"      type="cdItem"/>
> </xsd:complexType>
>
> <xsd:complexType name="cdItem">
>   <xsd:element   name="title"     type="xsd:string"/>
>   <xsd:element   name="quantity"
>    type="xsd:positiveInteger"/>
>   <xsd:element   name="price"     type="xsd:decimal"/>
> </xsd:complexType>
>
> </xsd:schema>
> >>
>
> I can load both into my DOM and both are OK
>
> but how can I validate my XML against the schema as the two
> are completely seperate entities ??????
>
>
> Howard Kidd
> Mobile +44 7973 839833
> @ Syntegra
> Tel +44 1932 773574
> mailto:kiddh@s...
> @ Diamond Software Systems
> Tel +44 20 83351941
>
> mailto:howard.kidd@d...
> @ Home
> Tel +44 20 83982856
> mailto:howard-kidd@h...
>
>
>
>
>
****************************************************************************
**
>
> Check us out at http://www.syntegra.com
>
> ***********************************************************************
>
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@l...


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.