On Wed, 29 Mar 2006, Wendell Piez wrote:
In other words, you'll move quickest to a sure understanding of XSLT if you
try it out in a classical architecture first, before you move on to all the
complexities and possibilities of multi-tier processing.
Wow.. I appreciate the reply in such a "broken down" form. It makes
sense to take out all the Javascript and work on the straight XML -> HTML
processing via XSLT, but the whole point of my project was to create a
very specific type of webpage that takes the structure (XML) and turns it
into a displayed page (HTML) with Javascript management. I know the
Javascript is really a tier unto its own, and shouldn't be able to be
processed via XSLT. I went through and tried some more examples, and
embedded XSL code inside of HREFs weren't actually possible, but I was
able to get modified Javascript calls via XSL through the <xsl:attribute>
tag. Whether this is *proper* or not is, of course, up for debate, but
xsltproc parsed it and gave output, so I assumed that it was proper. One
snippet of XSLT code I'm using as an example is:
<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>
(Notice the <xsl:value-of> tag inside the Javascript call inside the A
HREF, and inside the A HREF data field.)
It literally produces the following output from xsltproc (of course,
again, taken out of context.. I don't want to spam the list with code)
<A NAME="linkone" HREF="javascript:process('linkone',10)">Click me, value is:
10.</A>
(This is assuming that the XML file its using has a
<rootnode><value>10</value></rootnode> entry.)
Its stuff like this that is confusing. Technically, I can never read ALL
there is to know about XSLT while I'm learning, so I usually try examples
to see if what I learned in theory can be applied on "real examples". I.E.
stuff that I want to do with this type of technology. If xsltproc works,
and IE works on what I've produced, there's nothing really telling me its
"wrong". (Until, of course, I mention it on a mailing list like this one.
:) )
Regardless, I really appreociate the time you guys have given me in
replying with great ways to further my education in the field on the
"right track". I'll follow as many of those links as possible, and look
for other links regarding embedded Javascript or "how not to do it."
Thanks again,
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>
--~--