RE: HTML characters being converted
You need to make a paradigm shift. I sympathise, because I was trying to use XSL the way you are when I first came across it, and all you end up doing is banging your head against a brick wall. Take three steps to the left and use the open doorway instead... You've got to think in terms of outputting nodes, not tags in text. The element node is a single atomic thing, you output the element node and then its attributes and children. You haven't described the problem in enough detail to give the answer, but I don't see anything intrinsic in it that makes a "proper" XSLT approach infeasible. If you post a simple example of your XML input and the desired output I'm sure someone will leap to offer a solution. Mike Kay > -----Original Message----- > From: David Lamy [mailto:DLamy@xxxxxxxxxxx] > Sent: 02 December 1999 16:34 > To: 'XSL-List@xxxxxxxxxxxxxxxx' > Subject: HTML characters being converted > > > 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format