You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Chris Cuilla <ch...@cuilla.com> on 2003/04/08 17:42:22 UTC
multiple namespaces in a single document
I am using Xerces 2.3.0 to parse a document that is validated by an XML
Schema.
My document looks like this:
<jx:Model
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jx="http://www.jxbeans.org/JXBeans-1_0"
xmlns:wz="http://www.jxbeans.org/JXModeler-1_0"
xsi:schemaLocation="http://www.jxbeans.org/JXBeans-1_0
http://www.jxbeans.org/schema/JXBeans-1_0.xsd
http://www.jxbeans.org/JXModeler-1_0
http://www.jxbeans.org/schema/JXModeler-1_0.xsd"
>
<jx:Bean jx:ID="a">
<!-- OTHER NAMESPACE ELEMENT HERE -->
<wz:Location xmlns:wz="http://www.jxbeans.org/JXModeler-1_0" >
<wz:X>1</wz:X>
<wz:Y>1</wz:Y>
</wz:Location>
<!-- END OTHER NAMESPACE ELEMENT -->
<jx:Class>org.jxbeans.SimpleDocumentGenerator</jx:Class>
<jx:EventListener>
<jx:Name>documentReady</jx:Name>
<jx:Value>b</jx:Value>
</jx:EventListener>
</jx:Bean>
<jx:Bean jx:ID="b" jx:IsFinal="true">
<jx:Class>org.jxbeans.serializer.Serializer</jx:Class>
<jx:Property>
<jx:Name>fileName</jx:Name>
<jx:Value>tests/A.xml</jx:Value>
</jx:Property>
</jx:Bean>
</jx:Model>
I have set the following features:
http://xml.org/sax/features/namespaces
http://apache.org/xml/features/validation/schema
Everything works fine if I do NOT include the "wz" elements. However,
when I do, I get the following error:
cvc-complex-type.2.4.a: Invalid content starting with element
'wz:Location'. The content must match
'(("http://www.jxbeans.org/JXBeans-1_0":Class),("http://
www.jxbeans.org/JXBeans-1_0":EventListener){0-UNBOUNDED},("http://
www.jxbeans.org/JXBeans-1_0":Property){0-UNBOUNDED})'.
What am I doing wrong here?
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org