[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSL template "namespace" problem
Ian,
At 01:31 PM 3/29/2006, you wrote: <A NAME="linkone"><xsl:attribute name="HREF">javascript:process('linkone',<xsl:value-of select='/rootnode/value'/>)</xsl:attribute>Click me, value is: <xsl:value-of select="/rootnode/value" />.</A> In that page I pointed to earlier, mouse events are layered onto HTML spans, and it all works. (I have no idea if it's "correct", but validated only by testing. :-) I guess debate here might start by asking what's a "link". Nevertheless these are HTML/Javascript questions (on the upper layer), not XSLT questions. From what I'm understanding, this type of structure, because its not well formed, is completely incompatible with XSLT, even thought xsltproc processes it properly and IE interprets it correctly. Not quite. It is perfectly "well-formed" in the technical sense of that term, meaning syntactically-correct XML. Mike is just drawing your attention to potential problems in the handling this stuff *as HTML*: an issue of "HTML semantics" not of "well-formedness". As Mike also said, it's *correct XSLT*, and will work fine to generate *a result*. Whether that result is a good thing to give to a browser and get predictable results is an entirely different question. XSLTProc processes it properly because it's correct XSLT. So does MSXML (IE's XSLT engine). IE happens to do the "right thing" with the Javascript as composed in the HTML result of the transform. That may be fine for your purposes. Going a bit off topic, experts might also point out that even though IE is okay with it, you might have trouble getting other browsers to do what you expect. I guess I'm a little confused why these browsers and processors are interpreting it if its technically illegal. The XSLT is legal. As for why browsers do stuff with illegal HTML/Javascript ... it's a long and painful story (but not for this forum, heh). One of the good things about XSLT is that the line between what's legal and what's illegal is much clearer than it is with HTML and its associated technologies like Javascript and CSS. So too are those related but different questions: what works and doesn't work, what's portable and isn't. Cheers, Wendell
|
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
|