You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Mike Pogue <mp...@apache.org> on 2000/02/04 18:09:30 UTC
Use the Annotated XML Spec [was: CData-Attributes]
By the way, the Annotated Spec is an EXCELLENT way to look up this kind of thing.
It puts a lot of the esoteric stuff into perspective, and it
uses normal language, instead of "spec language".
You can find it at:
http://www.xml.com/axml/axml.html
Mike
Mike Pogue wrote:
>
> Let me try that again...(I hit SEND too soon!)
>
> An attribute of type "CDATA" is not the same as a "CDATA section".
>
> >From the spec:
>
> The ampersand character (&) and the left angle bracket (<) may appear in their
> literal form only when used as markup delimiters, or within a comment, a
> processing instruction, or a CDATA section. They are also legal within the literal
> entity value of an internal entity declaration; see "4.3.2 Well-Formed Parsed
> Entities". If they are needed elsewhere, they must be escaped using either numeric
> character references or the strings "&" and "<" respectively.
>
> >From the annotated spec:
>
> Escaping Delimiters
>
> The spec goes into a lot of agonizing detail, but it all
> amounts to: always use < for < (the "lt" stands for
> less-than, by the way) and & for &.
>
> Mike
>
> Armin Pfarr wrote:
> >
> > Hi,
> >
> > if I'm using a DTD
> >
> > <!ELEMENT a
> > EMPTY >
> > <!ATTLIST a
> > href CDATA #REQUIRED >
> >
> > and construct an Instance
> >
> > <a href="www.w3c.org?test=1&test2=5"/>
> >
> > I get a parsing error
> > "The Reference to entity test2 must end with the ";" delimiter.
> >
> > If I understand the spec correctly, CDATA-Attributes are final and may not
> > be processed by the parser. In this case I'd expect, that there is no
> > parsing error.
> >
> > Am I right?
> >
> > Armin
> > P.S.
> > The XHTML 1.0 DTD also describes the href-attributes as
> >
> > "href CDATA #IMPLIED"