xslt - schematron localfunctions gives error -
xslt - schematron localfunctions gives error -
i have schematron file contains xsl function.
i error : "the function functionname not found in namespace localfunctions"
here schematron codes:
<?xml version="1.0" encoding="utf-8"?> <schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:sch="http://purl.oclc.org/dsdl/schematron" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:fct="localfunctions" querybinding="xslt2" > <ns prefix="gl-plt" uri="http://www.xbrl.org/int/gl/plt/2010-04-16" /> <ns prefix="gl-cor" uri="http://www.xbrl.org/int/gl/cor/2006-10-25" /> <ns prefix="gl-bus" uri="http://www.xbrl.org/int/gl/bus/2006-10-25" /> <ns prefix="xbrli" uri="http://www.xbrl.org/2003/instance" /> <ns prefix="edefter" uri="http://www.edefter.gov.tr" /> <ns prefix="fct" uri="localfunctions" /> <title></title> <!-- <gl-cor:accountingentries> elemanı bir <gl-cor:entityinformation> elemanı içermelidir. --> <pattern id="accountingentries"> <rule context="/edefter:defter/xbrli:xbrl/gl-cor:accountingentries"> <let name="accoundmainidlist" value="gl-cor:entryheader/gl-cor:entrydetail[1]/gl-cor:account/normalize-space(gl-cor:accountmainid)"/> <assert test="fct:issorted($accoundmainidlist)">büyük defterde hesaplar, ana hesap numarası bazında sıralı olmalıdır.</assert> </rule> </pattern> <xsl:function name="fct:issorted" as="xs:boolean"> <xsl:param name="accoundmainidlist" as="xs:string*"/> <xsl:variable name="sortedaccountmainidlist" as="xs:string*"> <xsl:for-each select="$accoundmainidlist"> <xsl:sort/> <xsl:value-of select="."/> </xsl:for-each> </xsl:variable> <xsl:variable name="s1"> <xsl:value-of select="string-join($accoundmainidlist,'|')"/> </xsl:variable> <xsl:variable name="s2"> <xsl:value-of select="string-join($sortedaccountmainidlist,'|')"/> </xsl:variable> <xsl:choose> <xsl:when test="$s1 = $s2"> <xsl:value-of select="true()"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="false()"/> </xsl:otherwise> </xsl:choose> </xsl:function> </schema> why issorted xsl function not found in namespace ?
i'm assuming aware conventional method of running schematron schemas process them using xslt generate xslt stylesheet can executed against xml instance.
looking on github, xrouters schematron projects using old version of standard xslt stylesheets http://www.schematron.com/. these xslt 1.0 stylesheets , not capable of generating xslt 2.0 stylseheets.
the xsl:function element trying utilize part of xslt 2.0. given tool generating xslt 1.0 seems unlikely xslt 2.0 function operate.
if want seek approach may more successful, may suggest obtain re-create of saxon (the .net version) http://saxon.sf.net/. can build simple set of xslt transforms give more of chance of getting want.
xslt xsd schematron
Comments
Post a Comment