File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes schema and namespaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "schema and namespaces" Watch "schema and namespaces" New topic

schema and namespaces

Manuel Palacio
Ranch Hand

Joined: Oct 16, 2000
Posts: 45
I am trying to learn how to use XML Schema but I am having trouble with namespaces.
Having one XML doc with 2 namespaces like:
<?xml version="1.0" encoding="UTF-8"?>
xmlns :pcr=""
xsi:schemaLocation=" channel1.xsd">
<rdf escription>
<pcr :publication>
</pcr :publication>
</rdf escription>

How can I have 1 single schema that validates this document? I tried:
<?xml version="1.0"?>
xmlns :pcr=""
<xsd:element name="RDF" type="channel"/>
<xsd:complexType name="channel">
<xsd:element name="Description" type="pcr :publication"/>
<xsd:complexType name="publication">
<xsd:element name="from" type="xsd:date"/>
using Xerces 1.4 but it did not work. Could someone tell me how to write a schema with multiple namespaces correctly?
[This message has been edited by Manuel Palacio (edited July 31, 2001).]

<a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: schema and namespaces
It's not a secret anymore!