This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: breaking up <tags> is hard to do


 
> I'm trying to set an opening tag attribute based on the value 
> of my input;
> simple enough except that my closing tag needs to be outside 
> of my select
> template. How can I tell XSLT that I've taken care of my 
> closing tag further
> along in my stylesheet so I don't get a nesting error?

You need to change mindset. XSLT doesn't output tags, it outputs trees. I
found this took months to get used to, but you have to do it. You need to
find a way of constructing your stylesheet so that a single element in the
stylesheet outputs a single element in the result tree, you can't output the
start tag from one place and the end tag from another, because you can't
have half a node on your tree. Unless of course you resort to dirty tricks,
otherwise known as disable-output-escaping: but avoid that if you can.

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]