[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL template "namespace" problem

Subject: Re: XSL template "namespace" problem
From: Ian Bonnycastle <ibonny@xxxxxxxxxxxx>
Date: Wed, 29 Mar 2006 12:34:47 -0500 (EST)
xsl tag in javascript
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.