This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XSLT V 1.1



> So what's a problem? If you don't like to write 
> 
> <mumble href="some/xxx.xml"/>
> 
> <xsl:template match="mumble">
> <xsl:apply-templates select="document(@href)"/>
> </xsl:template>


I don't like to write that as that finds some/xxx.xml relative to the
stylesheet. (or did you man "some" here to be absolute?)

> You can write:
> 
> <mumble href="xxx.xml"/>
> 
> <xsl:template match="mumble">
> <xsl:apply-templates select="document(@href, 'some')"/>
> </xsl:template>

I don't like to write that as that puts "some" in the stylesheet but the
whole point is that it varies depending on which mumble node in the
document is being processed, and currently there is no way to determine
'some' from the stylesheet because the URI are not exposed to xpath.


> What's the problem ?
Neither of your suggestions provide the functionality of resolving a
relative URI reference relative to the URI of a particular node in the
source.


> I'm fine with your solution or with *any* other solution which will 
> turn document() monster into something simpler. 

well one assumes that even with the extra functions that I suggested
that document() will keep its semantics for reasons of compatibility
if nothing else, so you'll have to learn to live with the monster
(perhaps in 2.0 you can keep it caged though:-)


David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]