Xerces does support the 'any' tag and the error that it has thrown seems good.
In the schema file you said, processContents="skip" and namespace defaults to
"##any" for 'any' element. This means in the instance file you can have, any
well-formed XML from any namespace for 'any' element declaration. Body content
for this element won't be validated, but, there has to be a namespace from where
these elements are coming.
So, your instance file should go something like this:
<Question>
<Text>
This is<Font color=blue xmlns="http://www.w3.org/1999/xhtml"> the</Font>
text for Question 1.
</Text>
<Answer>...</Answer>
</Question>
Hope this helps.
Cheers,
Rahul.
> From: "greg" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: <xsi:any> and Xerces 1.4.1
>
> Hello all,
>
> This question may have been answered before but I couldn't get to the
archives, so here goes.
>
> I am trying to validate some xml that includes html tags. a piece of the xml
doc follows.
>
> <Question>
> <Text>
> This is<Font color=blue> the</Font> text for Question 1.
> </Text>
> <Answer>...</Answer>
> </Question>
>
> In my schema I have the Text element defined as follows.
> <xsi:complexType name="Text">
> <xsi:complexContent mixed="true">
> <xsi:sequence>
> <xsi:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
> </xsi:sequence>
> </xsi:complexContent>
> </xsi:complexType>
>
> When using xerces and sax to parse and validate this document I get the
following error reported..
>
> Error Level:VALIDATION
> ERROR Message:Element type "Font" must be declared.
>
> This schema segment is almost exact from the primer at w3c. Does xerces not
support the any tag? Or the mixed content type? Again I am using xerces 1.4.1.
>
> Thanks in advance.
>
> Greg
>
>
>
>
>
> ---------------------------------------------------------------------
> 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]