Michael,

Saxon Professional or Enterprise Edition are available without cost to non-commercials opensource projetcs? I can't see this information clearly on the site.

Thanks again,
Gustavo Honorato



On Wed, Nov 25, 2009 at 7:57 PM, Michael Kay <mike@saxonica.com> wrote:
xmlns:saxon="http://icl.com/saxon"
This is the Saxon namespace for Saxon 6.5 and earlier. The namespace for the current release (9.2) and every release since 7.0 is
 
xmlns:saxon="http://saxon.sf.net/"
Note however that in Saxon 9.2, extension functions such as saxon:line-number() are not available in the Home Edition - you need the Professional or Enterprise Editions.
 
Also note, you specified version="1.0" in your stylesheet, but the stylesheet uses XSLT 2.0 features (xpath-default-namespace). This is legal, but probably best avoided.
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay

 
 


From: Gustavo de Sá Carvalho Honorato [mailto:gustavohonorato@gmail.com]
Sent: 25 November 2009 20:41
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: [saxon] Difficulties using saxon:line-number

Hi all again,

now I'm having some difficulties using saxon:line-number function with JAXP API. The stylesheet below is returning the following error in function saxon:line-number. Anyone has any ideas of what is happening?

EXCEPTION:

Error on line 15
  Cannot find a matching 0-argument function named {http://icl.com/saxon}line-number()
  in built-in template rule
  at xsl:apply-templates (#11)
     processing /ncl/head[1]/regionBase[1]/region[1]
  in built-in template rule
  in built-in template rule
Caused by: net.sf.saxon.trans.XPathException: Cannot find a matching 0-argument function named {http://icl.com/saxon}line-number()
    at net.sf.saxon.expr.ErrorExpression.evaluateItem(ErrorExpression.java:58)
    at net.sf.saxon.expr.ErrorExpression.iterate(ErrorExpression.java:71)
    at net.sf.saxon.expr.Atomizer.iterate(Atomizer.java:180)
    at net.sf.saxon.expr.FirstItemExpression.evaluateItem(FirstItemExpression.java:96)
    at net.sf.saxon.expr.CastExpression.evaluateItem(CastExpression.java:316)
    at net.sf.saxon.instruct.SimpleNodeConstructor.expandChildren(SimpleNodeConstructor.java:254)
    at net.sf.saxon.instruct.SimpleNodeConstructor.processLeavingTail(SimpleNodeConstructor.java:193)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:619)
    at net.sf.saxon.instruct.Instruction.process(Instruction.java:93)
    at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:301)
    at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:619)
    at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:229)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:346)
    at net.sf.saxon.instruct.ApplyTemplates.defaultAction(ApplyTemplates.java:377)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:334)
    at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:210)
    at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:170)
    at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.java:301)
    at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:229)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:346)
    at net.sf.saxon.instruct.ApplyTemplates.defaultAction(ApplyTemplates.java:377)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:334)
    at net.sf.saxon.instruct.ApplyTemplates.defaultAction(ApplyTemplates.java:377)
    at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:334)
    at net.sf.saxon.Controller.transformDocument(Controller.java:1851)
    at net.sf.saxon.Controller.transform(Controller.java:1702)
    at br.pucrio.inf.serg.nclinspector.rulesengine.core.xslt.XSLTInspector.visit(XSLTInspector.java:70)
    ... 5 more

STYLESHEET:

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

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform
    xmlns:saxon="http://icl.com/saxon"
      extension-element-prefixes="saxon"
      xpath-default-namespace="http://www.ncl.org.br/NCL3.0/EDTVProfile">
     
    <xsl:template match="/ncl/head/regionBase">
        <result>
            <xsl:apply-templates />
        </result>
    </xsl:template>
    <xsl:template match="region[@top][@bottom][@height]">
        <violation line="{saxon:line-number()}" column="{saxon:column-number()}" msgKey="topBottomHeight" severity="warning">
            <arg><xsl:value-of select="./@id"/></arg>
        </violation>
        <xsl:apply-templates />
    </xsl:template>
    <xsl:template match="region[@left][@right][@width]">
        <violation line="1" column="1" msgKey="leftRightWidth" severity="warning">
            <arg><xsl:value-of select="./@id"/></arg>
        </violation>
        <xsl:apply-templates />
    </xsl:template>
</xsl:stylesheet>

Thanks in advance,
Gustavo Honorato

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/saxon-help