Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?
2006-10-17 05:42:06
Abel Braaksma wrote:
This output:
------------
Error on line 1 column 1 of file:/D:/Workspaces/Eclipse/etc/:
SXXP0003: Error reported by XML parser: Content is not allowed in
prolog.
Recoverable error on line 5 of
file:/D:/Workspaces/Eclipse/etc/def/config/test.xslt:
FODC0005: org.xml.sax.SAXParseException: Content is not allowed in
prolog.
<?xml version="1.0" encoding="UTF-8"?>
1)
2) file:/D:/Workspaces/Eclipse/etc/
3) file:/D:/Workspaces/Eclipse/etc/test.xml
There's an error in what I send above, it should of course be:
1)
2) file:/D:/Workspaces/Eclipse/etc/
3) file:/D:/Workspaces/Eclipse/etc/def/config/test.xml
From what I understand from you all is the following (nr have no
bearing with the above numbers):
1. If you place xml:base on xsl:stylesheet of your containing stylesheet
xslt file, and that base location does NOT have your stylesheet
physically, document('') will fail. In this scenario, it is NOT possible
to resolve the original XSLT file that the xslt processor was calling.
2. If you place xml:base only on places where needed, you can use a
global parameter with static-base-uri() to make sure it will be resolved
against the uri of the stylesheet. It will return the stylesheet url.
3. If you do not use xml:base at all, or when it points to a location
where your current xslt file is located as well, both
document-uri(document('')) and static-base-uri() will return the same
result.
Not sure I covered all scenarios. I am aware of URIResolver, or using
the xslt as a parameter or as source document. I decided, for now, to
put the name of the current xslt inside an entity reference. Not the
best solution, I know, and it has to be repeated for each stylesheet,
but good enough for the moment.
Colin, Dimitre, Michael, David, Andrew: thanks for the valuable insights!
Cheers,
-- Abel Braaksma
http://www.nuntia.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, (continued)
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Andrew Welch
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Abel Braaksma
- RE: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Michael Kay
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Andrew Welch
- RE: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Michael Kay
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Andrew Welch
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, David Carlisle
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Abel Braaksma
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Abel Braaksma
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?,
Abel Braaksma <=
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, David Carlisle
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Abel Braaksma
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Andrew Welch
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Abel Braaksma
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT, Colin Adams
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT, Colin Adams
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT, Abel Braaksma
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT, Colin Adams
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, George Cristian Bina
- Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Abel Braaksma
|
Previous by Date: |
RE: [xsl] [XSLT 2.0] Checking that an element's value has the desired datatype?, Costello, Roger L. |
Next by Date: |
Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, David Carlisle |
Previous by Thread: |
Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, Abel Braaksma |
Next by Thread: |
Re: [xsl] Referring to stylesheet itself, possible in XSLT 1.0, but how in XSLT 2.0?, David Carlisle |
Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|