
September 9th, 2003, 05:05 PM
|
|
Junior Member
|
|
Join Date: Sep 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Relative Namespace in XML/XSD
I have the following XML document that validates fine using the absolute paths for the namespaces.
<?xml version="1.0" encoding="UTF-8"?>
<Inventory xsi:schemaLocation="http://www.acme.com/schema URL" xmlns="http://www.acme.com/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
However, how do I make the namespaces relative to the location of the XML document? The XML documents are located in /application/files and the schemas (.xsd) are located in /application/schema. I tried to format the header as
<?xml version="1.0" encoding="UTF-8"?>
<Inventory xsi:schemaLocation="../schema ../schema/inventory.xsd" xmlns="../schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
But that doesn't work. Any thoughts?
|