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]
Other format: [Raw text]

Re: Speed and memory problems when transforming links


Michael Kay writes:

> I'll fix this, but meanwhile, try:
> 
>      <xsl:for-each select="link">
>        <xsl:variable name="frag" select="substring-after(@href, '#')"/>
>        <xsl:for-each select="document(substring-before(@href, '#'))">
>           <xsl:for-each select="id($frag)">
>              ...
> 
> This will also be more portable: the XSLT 1.0 spec leaves it up to
> the implementation how to interpret fragment identifiers in the URI
> reference.  (Which is why not many people use the facility, which is
> why you've found a bug that's present in both products, by the looks
> of it!)

Many thanks for your answer.

Actually, we planned to use our own URIResolver and a subset of
XPointer in the fragment identifier, e.g.

phone.xml#xpointer(id('phn_0')/range-to(id('phn_5')))

But I've never liked this idea anyway :]

-- 
Andreas

 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]