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

RE: Can one Use JavaScript to update XSL:Variables

Subject: RE: Can one Use JavaScript to update XSL:Variables
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Thu, 29 Jul 2004 10:41:25 -0500
use javascript in xsl
Hi Dave, 

> i was hoping my index.xml could parse the url.

It can't, at least not in the way you want. The XSL processor should parse
the url in your case, using Javascript to pass them into the processor. 

> I'd like to stick to XML/XSLT/JavaScript.

If you use client side processing, take into account that you're dependent
on the XSL processor installed on the client. If you target IE6, then
basically you can't use MSXML 4.0 because it doesn't come with IE6, but you
can use MSXML 3.0, only make sure you use the correct namespace:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"/>
...
</xsl:stylesheet>

For more info, go to:
http://www.perfectxml.com/articles/xml/XSLTInMSXML.asp
or Google "IE6 MSXML".

You can use MSXML 4.0 or 5.0 if you can get it installed onto the client
machines, and then use version-spcific ProgID's (as opposed to the
non-version-specific ones, which are supplied for use of the versions of
MSXML in a side-by-side mode). Anyway, using less then MSXML 3.0 is bad news
because they do not conform to the W3C specs.

Javascript is ideal to pass the url params into your stylesheet. What is
your target browser?

Cheers,
<prs/>

-----Original Message-----
From: dave frette [mailto:gohabitat@xxxxxxxxx] 
Sent: Wednesday, July 28, 2004 11:01 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Can one Use JavaScript to update XSL:Variables

Michael & Vasu -

Thanks, I finally found documentation that said the same.  I just now got
the emails, sorry for the delayed response.

OK.  I am building my own photogallery.  As a side, yes, I know it's all
been done before.  But hey, I want it my way!  Besides, I am learning.


Requirements (wishes)
a) 1 datafile per gallery called galleryname.xml(which could contain 200
images or more if desired).
b) only 15 (3 rows x 5 columns) thumbs shown on the index at a time.
c) user sees a choice of "Pages 1 2 3 4 5" and so on
d) when s/he presses the link for page 2, it shows the next 15 thumbs, or
presses 3 it shows thumbs 31-45
e) when clicked on a thumb, then browser directed to image.xml w/ image.xsl
w/ image.css.  I only want 1 image.xml file (i may have 50 galleries, i only
want 1 image.xml file) which can dynamically (client-side)figure which image
to display, perhaps based on URL. (I do not want a file with every image i
have in it.)
f) no popup windows, no flash, prefer not to use DOM either. I'd like to
stick to XML/XSLT/JavaScript.

So, in a nutshell, i was hoping my index.xml could parse the url, update
$page, and use-- <xml:for-each select="image[position() > $row * $col *
($page - 1) and position() < $row * $col * $page]"> 

Thanks for any help and suggestions!

- Dave




--- Michael Kay <mhk@xxxxxxxxx> wrote:
> > I want to parse the URL of my page and update an
> XSL variable. 
> 
> You can't update XSLT variables.
> 
> Now tell us your real problem (to which you thought the above might be 
> a solution).
> 
> Michael Kay
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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.