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

Re: Getting the name the input data document

Subject: Re: Getting the name the input data document
From: Jingjun Long <longjingjun@xxxxxxxxx>
Date: Fri, 21 Aug 2009 16:19:38 +0800
Re:  Getting the name the input data document
base-uri is useful to locate graphics, xml and other resource
referenced in the XML.

Thanks Michael, your response is useful for me.

Jingjun


2009/8/21 Michael Kay <mike@xxxxxxxxxxxx>:
>>
>> I tried to use base-uri to get XML path and static-base-uri
>> to get XSL path. This works find when I run the
>> transformation from XML file and XSL file locate on the hard disk.
>>
>> When I run the transformation against XML which generate on
>> the fly by a program. The base-uri function return empty.
>> From the implementation point of view there is no base-uri
>> for a XML which generated on the fly.
>>
>
> More precisely, when you generate XML it's your responsibility to define a
> base URI for it. If you don't define a base URI for it, then relative URIs
> contained within the document cannot be resolved.
>
> You can define a base URI by creating an xml:base attribute within the
> document, or from the API: for example, if the document is generated as the
> result of an XSLT transformation controlled using JAXP, you can use
> setSystemId() on the Result object passed to the transform() method.
>
> Regards,
>
> Michael Kay
> http://www.saxonica.com/
> http://twitter.com/michaelhkay

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.