This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Where to place the XML Schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Where to place the XML Schema" Watch "Where to place the XML Schema" New topic

Where to place the XML Schema

Karen Baog
Ranch Hand

Joined: Mar 02, 2005
Posts: 120
If I am given an XML schema and a XML document that requires validation against the XML schema, where should the XML schema be placed?

How will the XML document know where to find the XML schema?

amerzil co-ed student<br />"Praise be the Code"
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Well, the schemaLocation attribute value is what you would want to look into to determine this. The XML Validator uses this value to determine the location of the schema file.

For local testing you can put the schema file and the XML instance file in the same directory and try to validate the schema.

- m

Edit Comment:

Damn, it took be just ten days :roll: to reply to this - well, in case you are still wondering. Sorry about the delay, things have been a bit chaotic in life.

[ July 31, 2005: Message edited by: Madhav Lakkapragada ]
[ July 31, 2005: Message edited by: Madhav Lakkapragada ]

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: Where to place the XML Schema