This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Using Xlink and XPointer with XSLT
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Using Xlink and XPointer with XSLT
- From: Jens Schäfers <schaefers at adesso dot de>
- Date: Fri, 20 Apr 2001 14:06:11 +0200
- References: <3AE00116.97C78582@adesso.de> <20010420125521.Z30230@imag.fr>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Daniel,
> Ouch ... some good but hard questions have to be asked from time to time ...
:-)
> Let's try to be precise:
> [...] You will need to put some XLink logic within your XSLT program but adding direct support in XSLT wasn't possible and I doubt it's actually a good
> idea (keep thing generic is better IMHO).
> - about using XPointer, well once you have detected an URI Reference in one of the document constructs (be it XLink or something else) the only way to
> process the refernced resource is to use document()
The problem is that I don't want to write a whole new XSLT processor.
I'm using Xalan2 as XSL processor and I thought it would be enough to
write some XSLT stylesheets. But if I get it right you mean that there
is no way in XSLT itsself to use XLink/XPointer for referring to
external documents similar to the ID/IDREF construct inside a document.
Then document()-function must do (I must admit I hadn't thought of that)
though IMHO it would be more elegant if you could use XLink/XPointer in
this situation.
> However if you use only a name as the fragment identifier then the semantic can be considered 'stable' since just for HTML->XHTML compatibility a fragment
> identifier consisting of a Name should have the simple semantic of locating the element carrying the ID of that name (i.e. the equivalent of the XPath
> expression "id(name)").
That will do for my purposes. If I can't use it for XSLT processing
XPointer will still provide a way to store a reference to the external
element in the XML main document.
> The next question is 'how many XSLT processors support this', and the only answer I know is that it is not currently in libxslt (which is a shame since I have
> an XPointer implementation in libxml and doing it would probably amount to less than one hour of work).
I don't know what XSLT processor (or library) you're referring to. We're
using java-based tools here so there are the usual suspects: Xalan and
Saxon. I didn't find anything about the level of XLink/XPointer support
in this tools. But I'll use t
Thank you very much for your explanations and the hint to document()!
Jens
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list