RE: html fragments

Subject: RE: html fragments
From: Brian Young <Brian.Young@xxxxxxx>
Date: Tue, 25 Jul 2000 13:48:02 -0400

Hmmm...  This is the second note I've had posted to the list then rebound a day or two later to the list.

I'll look at it, but I have no idea why it is happening.  My apologies in the meantime.

Mike Kay already responded, so I know that it did make it to the list the first time.  Odd.

Oh, and Mike, while I've got your attention (hopefully :)), what were you referring to about well-formed XML representation of JSP pages?  I read up on XSP, but am still trying to fit it into the stuff I already know.  Is this what you were referring to?

   Brian Young

-----Original Message-----
From: Brian Young [mailto:Brian.Young@xxxxxxx]
Sent: Monday, July 24, 2000 2:08 PM
To: 'xsl-list@xxxxxxxxxxxxxxxx'
Subject: RE: html fragments

Hello Mike,

You bring up a point that has been troubling my thoughts lately.

I have well-formed XML (guess that is redundant, but ya know...) as output from an application.  I need to transform this XML to another well-formed XML hierarchy.  That is clearly (in my mind, please correct if not) the point of XSLT.  I also need to transform this XML to a JSP page that presents the data that the XML represents.  This is certainly a grayer area.

I'd be lying if I said that my XML->JSP XSLT didn't contain some disable-output-escapings.  I've tried to localize it by having any code that depends on the XML input (and obviously, the XSLT required to transform it) instead be written as first variable declarations that contain the XSLT then a nice chunk that just does the code, with one nice <xsl:text disable-output-escaping="yes"> around it.

Due to the abstraction of the input and output to trees, and not as a literal specification, I find it hard to impossible to produce well-formatted (i.e., legible) XSLT code *and* have the JSP output be nice.  And I have no problem with that, I understand that it is going against XSLT.  But it sure can be a pain.  :)  Since the XSLT is what I'll be maintaining and the end-customer is not going to see the JSP (they'll see the HTML on the client end), I tend to support nicely-formatted XSLT over nicely-formatted JSP output.  It's a tough call, though.  Opinions?

I was wondering if you all thought I am using the right tools for the job.  I do have well-formed XML input, I do need to take this XML and transform it into more XML, and my JSP code that is generated depends heavily on the parsed content of the XML input.  These all favor XSLT.  The fact that I am outputting JSP in some instances, however, indicates that maybe XSLT is not appropriate.

Thank you for your thoughts,
   Brian Young

-----Original Message-----
From: Mike Brown [mailto:mike@xxxxxxxx]
Sent: Friday, July 21, 2000 4:27 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: html fragments

> I want to construct a well-formed html document using a poorly formed
> html fragment at the top, a poorly formed but complementary html
> fragment at the bottom, and a well-formed html fragment in the middle.
> Can I do this?

XSLT is not the tool for this job. Generating output as a series of
pasted-together text is something that ASP, PHP, CFML, etc are better
suited for.

It is disappointing that XSLT documentation, including the new tutorial
at, tends
not to emphasize that XSLT operates on abstract node trees rather than
physical documents.

The physical stylesheets and the input and output are a layer removed
from what is actually going on, but one is led to believe that the
stylesheet is a literal specification for the desired output, and
further, that the stylesheet is intepreted directly, rather than being
a well-formed representation of an abstract tree, itself.

You will need to redefine your problem if you intend to use XSLT,
although someone will surely suggest very inelegant workarounds
involving the creation of text-oriented trees riddled with
disable-output-escaping flags.


 XSL-List info and archive:

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread