Altova Mailing List Archives

Re: [xsl] Getting the name the input data document

From: Jingjun Long <longjingjun@-----.--->
To: xsl-list@-----.------------.---
Date: 8/21/2009 8:20:00 AM
base-uri is useful to locate graphics, xml and other resource
referenced in the XML.

Thanks Michael, your response is useful for me.


2009/8/21 Michael Kay <mike@s...>:
>> 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
> --~------------------------------------------------------------------
> XSL-List info and archive:
> To unsubscribe, go to:
> or e-mail: <mailto:xsl-list-unsubscribe@l...>
> --~--

XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe@l...>


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.