Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Problem with a XML schema

From: Patrick <patrick@----.-->
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent