Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Problem with a XML schema >Thread Next - Re: Problem with a XML schema Re: Problem with a XML schemaTo: NULL Date: 11/3/2006 5:53:00 PM Patrick a =E9crit : > Joseph Kesselman a =E9crit : >> 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=20 >> (http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#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=20 >> you'd have to XMLify the HTML anyway) and since that would let you=20 >> constrain the xs:any specifically to tags in the XHTML namespace so=20 >> folks couldn't drop something completely bogus there. >> >> >=20 > Thanks for your quick answer. >=20 > I tried xs:any but have still a problem ... >=20 > I wrote the following XSD code : >=20 > <xsd:complexType name=3D"change_type" mixed=3D"true"> > <xsd:sequence> > <xsd:any minOccurs=3D"0" maxOccurs=3D"unbounded" /> > </xsd:sequence> > <xsd:attribute name=3D"date" > type=3D"xsd:date" > use=3D"required"/> > </xsd:complexType> >=20 > <xsd:element name=3D"change" > type=3D"change_type" > maxOccurs=3D"unbounded"/> >=20 > to describe the following XML line : >=20 > <change date=3D"2006-11-02">Bug fix for <i>Products</i> and <i>Users</i= >=20 > in the <b><i>main</i></b> form</change> >=20 > But the validator returns the error : >=20 > The element 'i' is not declared >=20 > Where is the problem ? >=20 > Thanks a lot. A self-answer ... I had forgotten to add the attribute processContents=3D"skip" in the=20 xsd:any declaration (an other newbie error). Now all is ok, the XML is validated. Thanks ... to me and to the documentation !!! Patrick | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
