[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

error testing id() in external document

Subject: error testing id() in external document
From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Oct 2007 05:56:06 +1300
 error testing id() in external document
Using xsltproc (libxml), and thus inside an <xsl:stylesheet version="1.0">,
the following template generates an error:

  <xsl:template match="jump[@srcfile]">
   <xsl:variable name="jfil" select="substring-before(@srcfile,'#')" />
   <xsl:variable name="jid" select="substring-after(@srcfile,'#')" />
   <!-- footnotes are an invalid external reference -->
   <xsl:if test="local-name(document($jfil,/)/id($jid)) = 'footnote'">
    <xsl:message terminate="yes">
     <xsl:text>Footnote reference to external document (</xsl:text>
     <xsl:value-of select="@srcfile" />
     <xsl:text> found in </xsl:text>
     <xsl:value-of select="$myfullself" />
    </xsl:message>
   </xsl:if>
  </xsl:template>

The error is:

  XPath error : Invalid expression
  xsl:if : could not compile test expression 'local-name(.. etc.

Is that really an invalid expression? Is there a valid expression that will
achieve the same thing?

Thanks
Trevor

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.