|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Using the document function with external document
Bjvrn Boxstart wrote:
Hello all, yes, but you do not need to create a DOM. The best/easiest way would be to use document(): <xsl:apply-templates select="document($dbIdentifier)"/> You need to create (implement) a custom URIResolver like: public Source resolve(String href, String base) {
String xmlFromDb = someObj.getXml(href);
if (xmlFromDb == null) {
xmlFromDb = "<not-found/>";
}
Source source = new StreamSource(new StringReader(xmlFromDb));
/* or
Source source = new StreamSource(someObj.getXmlAsInputStream(href));
or however...
*/
return source;
}best, -Rob 2. If not... Is it possible to pass a DOM object as a parameter to an XSL-T transformation?
|
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








