Project

Profile

Help

Bug #4331

closed

XTSE3051 is not raised

Added by Max Toro over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT 3.0 packages
Sprint/Milestone:
-
Start date:
2019-10-02
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

accept-pkg.xsl:

<?xml version="1.0"?>
<xsl:package name="http://localhost/pkg" version="3.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:local="http://localhost/pkg">
  
    <xsl:function name="local:foo" visibility="public">
       <xsl:sequence select="'foo'"/>
    </xsl:function>
 
</xsl:package>

accept.xsl:

<?xml version="1.0"?>
<xsl:stylesheet version="3.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:local="http://localhost/pkg"
    expand-text="yes">
 
    <xsl:use-package name="http://localhost/pkg">
       <xsl:accept component="function" names="local:foo" visibility="private"/>
       <xsl:override>
         <xsl:function name="local:foo">
            <xsl:sequence select="'foo2'"/>
         </xsl:function>
      </xsl:override>
   </xsl:use-package>
 
    <xsl:template name="xsl:initial-template">
       hello {local:foo()}
    </xsl:template>
 
</xsl:stylesheet>

command line:

 .\saxonhe\n\9.9.1.5\bin\Transform.exe -xsl:.\accept.xsl -it -lib:.\accept-pkg.xsl

outputs:

<?xml version="1.0" encoding="UTF-8"?>
       hello foo2
   

Please register to edit this issue

Also available in: Atom PDF