DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: XSLT and document.location.href

  1. #1
    James Drudge Guest

    XSLT and document.location.href


    Does anyone know how to assign document.location.href to an xsl:variable or
    xslaram?

    I'm trying to retrieve a querystring variable inside of my XSL stylesheet
    and assign it to an XSL variable for use throughout the page.

  2. #2
    Russell Jones Guest

    Re: XSLT and document.location.href

    Get a reference to the param node and then set its text property. For
    example:

    set myParam = xmlDoc.SelectSingleNode("xslaram")
    myParam.text = document.location.href
    ' now run the conversion

    You can handle variable assignment the same way.

    Alternatively, if you plan to use the same template many times, you can get
    a performance boost by creating an XSLTemplate object assigning your XSLT
    document to its stylesheet property, and then retrieving an XSLProcessor
    object and setting its parameters via the addParameter method.


    "James Drudge" <jamesd@netlibrary.com> wrote in message
    news:3a7b24d4$1@news.devx.com...
    >
    > Does anyone know how to assign document.location.href to an xsl:variable

    or
    > xslaram?
    >
    > I'm trying to retrieve a querystring variable inside of my XSL stylesheet
    > and assign it to an XSL variable for use throughout the page.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center