This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Preserving XHTML markup


> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Eric Vitiello
> Sent: Monday, February 04, 2002 8:08 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: RE: [xsl] Preserving XHTML markup
>
>
> -- Michael Kay [Mon, 4 Feb 2002 18:32:11 -0000]:
> >> On 02/04/2002 07:01:59 PM +0100, Markus Spath wrote:
> >> > <xsl:template match="mycustomtag">
> >> >  <p>
> >> >   <xsl:copy-of select="." />
> >> >  </p>
> >> > </xsl:template>
> >>
> >> Sorry, that's what I tried first. Thing is, it does the <p> bit,
> >>but
> >> doesn't preserve markup: you get:
> >
> >xsl:copy-of does preserve the markup. Perhaps you did xsl:value-of by
> >mistake?
>
>
> this brings up an interesting question.
>
> which is preferred, using xsl:copy-of or putting the XML in CDATA
> tags, and using value-of?

If you can control your markup and can be sure that it's well-formed XHTML,
why escape it? If you do, it's almost impossible to be processed with XSLT.

> I suppose it depends quite a bit on if the data is content or
> construction - i.e. is his "Some HTML <b>here</b>"
>
> actual content, or is it part of the structure of the XML document?

What's the difference?



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]