Joseph Kesselman a écrit :
Patrick wrote:
>How can I describe this tag in XSD to allow any HTML tag inside ?
Either spell out the full list of tags, or use xs:any
(http://www.w3.org/TR/2004/REC-xmlsch...028/#Wildcards)
A slightly better answer, I think, would be to explicitly allow XHTML
tags inside -- since XHTML is an XML language (which HTML isn't, so
you'd have to XMLify the HTML anyway) and since that would let you
constrain the xs:any specifically to tags in the XHTML namespace so
folks couldn't drop something completely bogus there.
Thanks for your quick answer.
I tried xs:any but have still a problem ...
I wrote the following XSD code :
<xsd:complexType name="change_type" mixed="true">
<xsd:sequence>
<xsd:any minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="date"
type="xsd:date"
use="required"/>
</xsd:complexType>
<xsd:element name="change"
type="change_type"
maxOccurs="unbounded"/>
to describe the following XML line :
<change date="2006-11-02">Bug fix for <i>Products</iand <i>Users</i
in the <b><i>main</i></bform</change>
But the validator returns the error :
The element 'i' is not declared
Where is the problem ?
Thanks a lot.