[jdom-interest] Do schemas work with JDOM?

Fishman, Rick Rick_Fishman at ctilogistx.com
Mon Jan 22 14:26:08 PST 2001


Oops. I didn't realize there was that much difference. I will take a look at
the W3C spec and try that.

Thanks.

Rick

-----Original Message-----
From: Michael Brennan [mailto:Michael_Brennan at Allegis.com]
Sent: Monday, January 22, 2001 5:23 PM
To: Fishman, Rick; JDOM Interest (E-mail)
Subject: RE: [jdom-interest] Do schemas work with JDOM?


Your schema is in XDR, which is a Microsoft proprietary format. I doubt that
any of the Java validating parsers understand XDR.

You should try using XML Schema Definition language (XSD):
http://www.w3.org/XML/Schema

> -----Original Message-----
> From: Fishman, Rick [mailto:Rick_Fishman at ctilogistx.com]
> Sent: Friday, January 19, 2001 1:01 PM
> To: JDOM Interest (E-mail)
> Subject: [jdom-interest] Do schemas work with JDOM?
> 
> 
> Does JDOM understand schemas? The xml file below doesn't 
> work. If I run it
> without validation, JDom doesn't see any elements. With 
> validation, I get
> the following exception:
> 
> Root cause: org.jdom.JDOMException: Error on line 1 of document
> file:/C:/JavaProjects/JDomTest/ReadTest.xml: General Schema 
> Error: Grammar
> with uri : x-schema:ReadTestSchema.xml , can not found.
> 
> I've got the schema in the same directory as the xml file. I 
> tried with
> 'x-schema:http://localhost/ReadTestSchema.xml' after putting 
> the schema in
> my default web site and that doesn't work either (same problem).
> 
> XML file (ReadTest.xml):
> 
> <RICKSDOC xmlns="x-schema:ReadTestSchema.xml">
>    <ROUTE ID="1">
>       <TRIP ID="1">
>          <STOP ID="1" />
>       </TRIP>
>    </ROUTE>
> </RICKSDOC>
> 
> Schema file (ReadTestSchema.xml):
> 
> <Schema xmlns="urn:schemas-microsoft-com:xml-data">
> <AttributeType name="ID" />
> <ElementType name="STOP">
>    <attribute type="ID" />
> </ElementType>
> <ElementType name="TRIP" >
>    <attribute type="ID" />
>    <element type="STOP" />
> </ElementType>
> <ElementType name="ROUTE">
>    <attribute type="ID" />
>    <element type="TRIP" />
> </ElementType>
> <ElementType name="RICKSDOC">
>    <element type="ROUTE"/>
> </ElementType>
> </Schema>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com



More information about the jdom-interest mailing list