Subject: Re: Literal Text From: Andrew McNaughton <andrew@xxxxxxxxxxx> Date: Sat, 27 Mar 1999 02:52:58 +1200 |
jtauber@xxxxxxxxxxx said: > > Given this XSL: > > > > <xsl:text></JPanel></xsl:text> > > > > When run through Lotus XSL Processor I get this output: > > > > </JPanel> > > > > When I really want: > > > > </JPanel> > > > > What am I doing wrong? > > <xsl:text> is for generating character data. </JPanel> is a way to > represent </JPanel> as character data so it won't be confused with an > end-tag. > > You wanted an end-tag? Well you can't have an end-tag without a start-tag > and that makes an element. XSL is about outputing elements, not just > individual tags. > > So don't think of it in terms of wanting </JPanel> but rather wanting an > element of the type JPanel. In which case you just use <JPanel>...</JPanel> > in your template. You don't need <xsl:text>. While it's good to have a tool for transforming XML->XML, and I see some advantages to having a tool that catches you when you fail to produce well formed XML, I really think that there should be a way to produce other text formats when appropriate. XML is designed as much as anything for easy interchange of data. Otherwise we might as well go back to binary formats. Given that, what's the use of an interchange format without good tools for converting to and from other formats. Why shouldn't XSL have an <xsl:decode-text> mechanism that expands entities and removes the markup surrounding CDATA sections without regard for well-formedness? Appropriate naming should mean that anyone using it will know that they don't get any guarantee of well-formedness in their output. Andrew McNaughton -- ----------- Andrew McNaughton andrew@xxxxxxxxxxx http://www.newsroom.co.nz/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Literal Text, James Tauber | Thread | Re: Literal Text, Guy_Murphy |
RE: What about IE5, Didier PH Martin | Date | RE: Should expansions be allowed in, Mark Birbeck |
Month |