|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: URL rewriting with session id
> <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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








