[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Encapsulating and displaying html fragments

Subject: RE: Encapsulating and displaying html fragments
From: Shaun ONeil <shaun@xxxxxxxxxxx>
Date: Sat, 15 May 2004 19:28:35 -0400
shaun oneil
On Sat, 2004-05-15 at 12:57 +0200, Andreas L. Delmelle wrote:
> > From: Shaun ONeil [mailto:shaun@xxxxxxxxxxx]

> Is there any reason in particular why your input looks the way it does?
> 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <?xml-stylesheet type="text/xsl" href="testcase.xsl"?>
> > <test>
> >   <fragment>&lt;p&gt;A &lt;acronym title="HyperText Markup
> > Language"&gt;HTML&lt;/acronym&gt; fragment&lt;/p&gt;</fragment>
> > </test>

I hadn't thought of treating the HTML as XML, so I'd experimented with
CDATA sections .. then realised it was having the same effect as
entities, so I stuck with that to keep on eless complication (CDATA) out
of the puzzle

> The content of the fragment node is actually valid XML, so why not just make
> it:
> 
> <fragment>
>   <p>A <acronym title="HyperText Markup Language">HTML</acronym>
> fragment</p>
> </fragment>
> 
> to begin with. Then you won't need d-o-e after all, just use
> 
> <xsl:copy-of select="fragment/p" />
> 
> to copy it to the result tree...

I'm dealing with XHTML 1.0 Strict, for both the source fragments and the
rendered document .. so they should always be valid XML :o)  Once again
my common flaw of sticking with what I was used to (value-of) rather
that looking to see what other tools are available - copy-of
"fragment/*" is doing the trick perfectly.

> HTH!
> 
> Greetz,
> 
> Andreas

It does indeed,
Thanks
  Shaun

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.