In the schema for the element jx:Bean
(http://www.jxbeans.org/schema/JXBeans-1_0.xsd) there is a content model
(Class, EventListener*, Property*)
which does not allow any other elements.  You would need to change the
schema to permit whatever additional elements you want before the Class
element, regardless of what namespace they come from.  If you mention the
elements or types in the namespace corresponding to the prefix in the wz
namespace in the schema, you will need to include an import element which
imports that namespace.

Jeff

----- Original Message -----
From: "Chris Cuilla" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 08, 2003 8:55 AM
Subject: (REVISED) multiple namespaces in a single document


> [ NOTE: Minor revisions to previous post. I am now using Xerces 2.4.0. ]
>
> I am using Xerces 2.4.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>
> <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'. One of '{"http://www.jxbeans.org/JXBeans-1_0":Class}' is
> expected.
>
> What am I doing wrong here?
>
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to