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

RE: URL rewriting with session id

Subject: RE: URL rewriting with session id
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Wed, 27 Aug 2003 11:34:53 +0100
xsl document url rewriting
> <xsl:copy-of select="document(
'../xml_inc/documentname.xml')/include/*"/>
> 
> The problem is that these documents have hyperlinks embedded in them,
but
> these of course do not have the session ID.  How to do extend the xsl
> statement above to put in the session ID?

You want to use a custom URIResolver that handles the document()
request.  You can then SAX parse the XHTML document on its way 'through'
the uri resolver modifying the hrefs with the session ids.

http://www.cafeconleche.org/books/xmljava/chapters/ch17s02.html#d0e32363

...gives an example of a URIResolver returns a gzipped version of a
document.  Examples are sparse but its not that hard to do.  Write your
sax parser first and make sure it gives you the output you want, then
call it from your URIResolver.
 
Remember to use setURIResolver() on the Transformer and not on the
TransformerFactory as that handles the document() calls, only
import/include instructions are handled by the resolver set on the
factory. (iirc).

andrew

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.