This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XPOINTER to HTML by XSL
On Thursday 07 March 2002 02:31, Jeni Tennison wrote:
> If you're just dealing with XPointers that look like XPaths, you could
> try splitting value of the href attribute and using Xalan's evaluate()
> extension function on the pointer. Something like:
>
> <xsl:for-each select="document(substring-before(@href, '#'))">
> <xsl:variable name="path"
> select="substring-before(substring-after(@href, '#xpointer('),
> ')')" />
> <xsl:value-of select="xalan:evaluate($path)" />
> </xsl:for-each>
Careful that substring-before(..., ')') will get everything before the
*first* ')' after the '#'. So if the XPointer expression has a ')', then
this would break. Perhaps you could do:
substring-after(substring(@href, 1, string-length(@href) - 1), '#xpointer(')
so long as you always know that there is exactly one ')' and never anything
else at the end of the href.
--
Peter Davis
In order to discover who you are, first learn who everybody else is;
you're what's left.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list