Subject: HTML characters being converted
From: David Lamy <DLamy@xxxxxxxxxxx>
Date: Thu, 2 Dec 1999 09:33:55 -0700
|
Hello all--
I'm using my XSL stylesheet to create HTML.. one of the "challenges"
I've run into are situations where I need to conditionally output only
half of a tag group (i.e. <tr> but not </tr>) in an XSL block.. if I
only put in half of the group, the stylesheet ceases to be well-formed,
and I get angry messages from both my XML writer and the XSL processor.
So, I thought I would perform the condition processing and subsequent
output in a Java class so that the XSL processor would not complain
about well-formedness.. good idea, and the code runs, but in the
resultant HTML, the "<" in the "<tr>" tag mysteriously becomes a "<"!
The ">" doesn't get converted, however. But, this is enough to screw up
the HTML, since the "<tr>" tag is rendered in the browser rather than
being identified as an HTML tag.
Does anyone have any ideas on this problem(s)? I'm open both to
solutions for the well-formedness issue as well as the character
conversion issue.
Details on the scenario follow:
The XML is generated by a screen designer that allows a user to
graphically define a screen. One of the graphical components is a
CheckBox group. An attribute of the CheckBoxGroup is the number of
columns in the group. The subelements are the checkboxes themselves. I
need to render these checkboxes as a group according to the number of
columns.. so I'm creating an HTML table, with each <tr> being composed
of as many <td>s as the number of columns.. so you see my need for
conditional outputting of <tr> and </tr> tags.. I'm keeping a counter of
how many <td>s I've outputted for a <tr> and conditionally I want to
spit out a </tr> if the counter has reached the number of columns value.
Thanks in advance for your help!!
Dave Lamy
MarketVision, Inc.
dlamy@xxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|