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

Re: Get extern xml document represented by a string

Subject: Re: Get extern xml document represented by a string
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 10 Dec 2001 17:36:46 +0000
xalan parse
Hi Paulo,

> How can I get another xml document, represented by a string, to use
> in my xslt?

There isn't anything in XSLT that will let you do this. There are
several possibilities that might be appropriate depending on how
you're calling Xalan (from a command line? within Cocoon? within some
Java code?):

 - in the code that calls Xalan, parse the string into a DOM and pass
   that DOM in as a parameter to the stylesheet.

 - construct an Entity Resolver that recognises a 'URL' for the
   document, and use the document() function to access the DOM from
   within the stylesheet.

 - use a two-step process in which you first create an XML document
   based on a string, and then transform that XML document.

 - write an XML parser using XSLT and use that to parse the string.

The last one is a joke :)

Cheers,

Jeni

P.S.
It would be nice if XSLT processors supported the data: URI schema
because then you could just do:

  document(concat('data:text/xml,' + $string))

to get hold of the XML document.


---
Jeni Tennison
http://www.jenitennison.com/


 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.