Project

Profile

Help

Bug #4206

Updated by Michael Kay almost 5 years ago

using SaxonEE 9.6. 

 we have a xslt having this below line  

  
 ~~~ xml 
 <xsl:variable name="descriptor-nodes" select="l1d | .//descriptor"/>    
     
 ~~~  

 
 and it    results in below    exception 

 net.sf.saxon.s9api.SaxonApiException: Stylesheet compilation failed: 2 errors reported at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:546) at  

 Caused by: net.sf.saxon.trans.XPathException: Stylesheet compilation failed: 2 errors reported at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:97) at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:543) 

 Adding the StaticErrorHandler    gives the error message as  

 **Invalid character '\' in expression; SystemID: file:/xxxx/xxxx.xsl; Line#: 90; Column#: 144** 

 which points to the above mentioned XSLT line 

 we think its    related to Union operator    as the below code works  

 ~~~ 
 <xsl:variable name="descriptor-nodes" select="l1d | //descriptor"/>       --> without dot, works good 
  <xsl:variable name="descriptor-nodes" select="l1d"/>                            --> works good 
  <xsl:variable name="descriptor-nodes" select=".//descriptor"/>            -->works good 
 ~~~ 

 with this ,we can conclude that xsltcompiler throws fatal error for expression    **"node1 | .//node2"**    ?     

Back