xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Cristian Bina" <geo...@sync.ro>
Subject Re: Validating with XML Schema using local schema files
Date Sun, 08 Aug 2004 05:03:23 GMT
Hi David,

>
saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-sch
> emaLocation","file:///home/xml/schema/basicTypes.xsd
> file:///home/xml/schema/platform.xsd");

Have a look at http://xml.apache.org/xerces2-j/properties.html and review
both http://apache.org/xml/properties/schema/external-schemaLocation and
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
properties.
If your schema do not specify a target namespace you should use the
http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
property and specify only your master schema document, that is platform.xsd.

saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-noN
amespaceSchemaLocation",file:///home/xml/schema/platform.xsd);

If your schema specifies a target namespace then you should specify it
inside the schema location as targetNamespace followed by the schema
location. Again use only platform.xsd.

saxBuilder.setProperty("http://apache.org/xml/properties/schema/external-sch
emaLocation","targetNamespaceForYourSchema
file:///home/xml/schema/platform.xsd");

Best Regards,
George
-------------------------------------------------------
George Cristian Bina mailto:george@oxygenxml.com
<oXygen/> XML Editor and XSLT Editor/Debugger
http://www.oxygenxml.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Mime
View raw message