OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: DOCBOOK-APPS: Missing CDATA sections


May I ask why?  I'd certainly agree with Elliotte on this point.  There is
absolutely no difference between

<![CDATA[ This is text ]]>

and

This is text.

Also, there's no difference between

<![CDATA[<xmltag attname="attvalue">blah</xmltag>]]>

and

&lt;xmltag attname="attvalue"&gt;blah&lt;/xmltag&gt;]]>

as far as an XML parser is concerned, so it seems unnecessary to attempt to
maintain the distinction in either the XML source or in a transformation
result.  If that difference is important, you'll have to come up with some
way of tagging around the CDATA, for example:

<phrase role="cdata><![CDATA[ This is text ]]></phrase>

and inserting the CDATA tags back in manually.  Even this would be tricky
and you'd have to play around with the "disable-output-escaping" attribute
to get it to work.

This might work:

<xsl:template match="phrase[@role='cdata']" disable-output-escaping="yes">
 &lt;![CDATA[
  <xsl:apply-templates/>
 ]]&gt;
</xsl:template>

-----Original Message-----
From: fyl2xp1 [mailto:vnhu38f93@subdimension.com]
Sent: Thursday, July 11, 2002 5:09 PM
To: docbook-apps
Subject: Re: DOCBOOK-APPS: Missing CDATA sections


no there was, I needed to include CDATA sections!
----- Original Message -----
From: "Elliotte Rusty Harold" <elharo@metalab.unc.edu>
To: "fyl2xp1" <vnhu38f93@subdimension.com>; "docbook-apps"
<docbook-apps@lists.oasis-open.org>
Sent: Thursday, July 11, 2002 8:12 PM
Subject: Re: DOCBOOK-APPS: Missing CDATA sections


> At 7:42 PM +0100 7/11/02, fyl2xp1 wrote:
> >That is because I am not referring to the HTML style-sheets,
> >that was made quite clear in my original email.  It turns out
> >that the XSLT spec states:
> >
> >"CDATA sections should not be used except for text nodes that
> >the cdata-section-elements attribute explicitly specifies should
> >be output using CDATA sections."
>
> So is your problem that the text did in fact show up but it was not
> enclosed in the CDATA section? If so, you should never have expected
> that it would be. CDATA sections are syntax sugar, nothing more.
> Processes should not and in general do not depend on whether text is
> enclosed in a CDATA section, escaped with character references, or
> escaped with entity references. It's all the same thing. If so, then
> there really wasn't a need to "go through re-inserting the CDATA
> sections."
>
> --
>
> +-----------------------+------------------------+-------------------+
> | Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
> +-----------------------+------------------------+-------------------+
> |          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
> |              http://www.cafeconleche.org/books/xian2/              |
> |  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
> +----------------------------------+---------------------------------+
> |  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
> |  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
> +----------------------------------+---------------------------------+


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC