On Wed, 29 Mar 2006, Wendell Piez wrote:
Notice that none of this has anything to do with Javascript. It's only job is
to construct a node hierarchy containing certain elements and attributes with
certain values. Those values happen to be syntactically-correct Javascript,
but the XSLT engine doesn't know that and doesn't have to.
Actually, what you did with the <xsl:text> tag (one tag I didn't even
know existed) is exactly what I did without it. (If that makes any sense.)
I've actually figured out a THIRD possibility (actually pointed to by the
website http://www.quirksmode.org/ earlier)... which is removal of
Javascript completely from the XLST file, and thereby making the document
well-formed again. (I hope!) I've used the docs there to put all
Javascript code in a seperate file thats not processed by an XSLT
processor, and therefore, doesn't get mixed in with all the well-formed
mess we were talking about earlier. I've coded the Javascript to acutally
adapt to whats in the main document, and modify everything externally. All
thats needed is one "kick off" call from the <BODY onLoad=""> tag. It
makes the XSLT file easier to handle, too. The only problem is that I need
to edit 3 different documents to create 1 web page. In the interest of
portability, though, its worth it. I can apply the same Javascript code
and XSLT transformations to many different XML documents and create many
different pages with the same effects. (Which, as far as I can tell, was
*one* of the purposes of XSLT in the first place... of course, not the
only one, though.)
This only leaves me with one question before I put this thread to bed.
I've heard different people mention that the browser doesn't see XML or
XSLT... just the resulting HTML (at least when it "renders" it.) But I
find this confusing.. the browser *must* load the two seperate doucments
(XML and XSLT files), as there is no URL reference to an HTML file... and
the server doesn't generate the HTML either... so where exactly does the
processor lie? Is it a section of code that is called when the browser-in-
question attempts to "process" an XML file with XSLT stylesheets attached?
Or is it called when ANY stylesheet is attached to ANY type of file?
Thanks again for all your help,
Ian
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--