cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Tyler <r...@ticketweb.com>
Subject Re: how to apply xsl transforms to xsp-generated xml
Date Thu, 24 Feb 2000 22:09:29 GMT
Claudio Sacerdoti Coen wrote:
> 
>  Hi,
> 
> On Tue, Feb 22, 2000 at 12:44:11 -0800, Rick Tyler wrote:
> > You understoood my question!
> >
> > Samples .xml and .xsl files follow.
> 
>  Rick, have you resolved your problem?
>  If not, I think that you should use
> 
>   <xsl:text disable-output-escaping="yes"> text_not_to_be_quoted </sxl:text>
> 
>  to resolve it ... at least so is said in XSLT reccomendation.
> 
>  But, as remarked in the ``Use of "disable-output-escaping"'' post
>  of 22/02/2000 by Irene Schena (never answered!), it seems not to work in the
>  expected way. (Why? Could someone explain how to use it?)

I have finally figured out why XSP does what it does - it sends
a DOM tree to the next processing layer (XSLT in this case), NOT
a string of XML character data which the XSLT layer would parse
before doing its magic.  That perhaps should have been obvious,
but I am lazy and rarely read every last bit of documentation
before I dive into experimentation.

In other words, when I do this:

	<xsp:expr><!CDATA["<foo>bar</foo>"]]</xsp:expr>

XSP inserts a SINGLE TEXT NODE into the DOM tree for my entire
expression, regardless of the tree structure represented by
the (XML) expression.  I'm not saying it's not wrong; it just
took me a while to figure this out.

The only solution to my problem is therefore to instantiate
an XML parser which will run against my XML String and build
the required DOM substree.

I would argue that it would make sense to add an <xsp:xml>
tag or some such which implicitly builds the DOM subtree tree
in cases like mine where XML is being generated by another
application tier.  On the other hand, it sounds like I am
the only person try to glom Cocoon on top of a legacy CGI
system (modified to generate XML rather than HTML).

Anyway, I understand how it works now.

Thanks,

- RT

Mime
View raw message