|
Subject: RE: [xsl] Using document() From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Wed, 9 Oct 2002 09:11:58 +0100 |
It's up to the XSLT processor to decide what kind of URIs it's prepared
to handle. I think that many XSLT processors won't touch fragment
identifiers. Saxon does have some limited support for fragment
identifiers, but it's a but fragile. It's better to strip them off, load
the document without them, and then find the node you are looking for.
Incidentally, document('#id2') is referring to a node in the stylesheet
while document(@xlink:href) is referring to a node in the source
document. The choice of base URI depends on whether the argument is a
node or a string.
Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Adam van den Hoven
> Sent: 08 October 2002 21:50
> To: XSL Mailing list
> Subject: [xsl] Using document()
>
>
> Sorry if this appears twice, I'm having some problems with my
> mail systems.
>
> I have a question.
>
> I want to use the following:
>
> <xsl:apply-templates select="document('#id2')" />
>
> Ok, I'd never actually use this. In reality its something like:
>
> <xsl:apply-templates select="document(@xlink:href)" />
>
> which is likely to contain simply fragment identifiers since
> I'm using XLinks to normalize a sitemap hierarchy.
>
> When I try to run this as part of a transform, I get an error
> saying that the file (fully resolved to refer to the source
> doc) cannot be found. Is this a problem with how I'm doing
> things or perhaps a problem with app I'm using to develop
> templates with (Stylus Studio)?
>
> Do you have any other ideas about how I can accomplish the
> same thing given that some of my xlink:href attributes will
> point to external documents?
>
> Thanks,
> H. Adam van den Hoven
>
> Web Developer
>
> Credit Union Central of BC
>
>
> __________________________________________________
> D O T E A S Y - "Join the web hosting revolution!"
> http://www.doteasy.com
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Using document(), Adam van den Hoven | Thread | RE: [xsl] Using document(), Richard Lander |
| RE: [xsl] XSL nested tag (new quest, Michael Kay | Date | [xsl] XML => XML : Changing some at, alexandre bord |
| Month |