Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Catalog] is not propagated to xsl included in schematron #58

Open
cmarchand opened this issue Jul 28, 2020 · 0 comments
Open

[Catalog] is not propagated to xsl included in schematron #58

cmarchand opened this issue Jul 28, 2020 · 0 comments
Assignees
Labels

Comments

@cmarchand
Copy link
Collaborator

cmarchand commented Jul 28, 2020

If a schematron uses a

<xsl:import href="dependency:/eu.els.sie.lib.xsl.common+xslLib/xslLib/els-common.xsl"/>

And if accessing this URL requires a catalog lookup, as for the previous URL, then it fails looking into this XSL.
Error is

[INFO] Copying resource files referenced from XSpec for Schematron
file:/Users/cmarchand/devel/bitbucket/sie-xf-xdev-flash/modules/sie-xf-editor/src/test/xspec/efl/infoCommentaire/infoCommentaire.html.control.xspec
$callers.uris=

file:/Users/cmarchand/devel/bitbucket/sie-xf-xdev-flash/modules/sie-xf-editor/src/main/grammars/efl/infoCommentaire/xf_infoCommentaire.html.sch
$callers.uris=
   file:/Users/cmarchand/devel/bitbucket/sie-xf-xdev-flash/modules/sie-xf-editor/src/main/grammars/efl/infoCommentaire/xf_infoCommentaire.html.sch
[ERROR] document is not available:  dependency:/eu.els.sie.lib.xsl.common+xslLib/xslLib/els-common.xsl
Type error in xsl:with-param/@select on line 288 column 75 of get-xml-file-static-dependency-tree.xsl:
  XTTE0590: An empty sequence is not allowed as the value of parameter $res.attribute
  In template rule with match="element(Q{http://purl.oclc.org/dsdl/schematron}extends)" on line 286 of get-xml-file-static-dependency-tree.xsl
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#349
  In template rule with match="*" on line 348 of get-xml-file-static-dependency-tree.xsl
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#349
  In template rule with match="*" on line 348 of get-xml-file-static-dependency-tree.xsl
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#349
  In template rule with match="*" on line 348 of get-xml-file-static-dependency-tree.xsl
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#134
  In template rule with match="/" on line 110 of get-xml-file-static-dependency-tree.xsl
     Focus
        Context item: /
        Context position: 1
     Local parameters
        $dependency-type = "x:description"
        $uri = "../../../../main/grammars/efl/infoC..."
     Tunnel parameters
        $callers.uris = "file:/Users/cmarchand/devel/bitbuck..."
     Local variables
        $dependency-type = "x:description"
        $uri = "../../../../main/grammars/efl/infoC..."
        $specific-attributes-set =  (@defaultPhase="Validation", @queryBinding="xslt2", @id="validation_EE_infoCommentaire", ... [4])
        $abs-uri = "file:/Users/cmarchand/devel/bitbuck..."
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#151
at template xut:get-xml-dependency on line 139 of get-xml-file-static-dependency-tree.xsl:
     Focus
        Context item: /x:description
        Context position: 1
     Local parameters
        $res.attribute = "../../../../main/grammars/efl/infoC..."
     Local variables
        $callers.uris = ()
        $res.attribute = "../../../../main/grammars/efl/infoC..."
        $dependency-type = "x:description"
        $abs-uri = "file:/Users/cmarchand/devel/bitbuck..."
     invoked by xsl:call-template at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#323
  In template rule with match="document-node()/element(Q{http://www.jenitennison.com/xslt/xspec}description)[attribute::attribute(Q{}schematron)]" on line 322 of get-xml-file-static-dependency-tree.xsl
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#134
  In template rule with match="/" on line 110 of get-xml-file-static-dependency-tree.xsl
     Focus
        Context item: /
        Context position: 1
     Local variables
        $dependency-type = ()
        $uri = ()
        $specific-attributes-set = ()
        $abs-uri = "file:/Users/cmarchand/devel/bitbuck..."
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#61
  In template rule with match="/" on line 57 of get-xml-file-static-dependency-tree.xsl
     Focus
        Context item: /
        Context position: 1
     Local variables
        (All variables are null)
     invoked by xsl:apply-templates at jar:file:/Users/cmarchand/.m2/repository/org/mricaud/xml/xut/0.1.1/xut-0.1.1.jar!/org/mricaud/xml-utilities/get-xml-file-static-dependency-tree.xsl#49
  In template rule with match="/" on line 48 of get-xml-file-static-dependency-tree.xsl
[ERROR] while processing /Users/cmarchand/devel/bitbucket/sie-xf-xdev-flash/modules/sie-xf-editor/src/test/xspec/efl/infoCommentaire/infoCommentaire.html.control.xspec
net.sf.saxon.s9api.SaxonApiException: An empty sequence is not allowed as the value of parameter $res.attribute
    at net.sf.saxon.s9api.XsltTransformer.transform (XsltTransformer.java:364)
    at io.xspec.maven.xspecMavenPlugin.utils.XSpecCompiler.prepareSchematronDocument (XSpecCompiler.java:243)
    at io.xspec.maven.xspecMavenPlugin.XSpecRunner.processXSpec (XSpecRunner.java:234)
    at io.xspec.maven.xspecMavenPlugin.XSpecRunner.execute (XSpecRunner.java:199)
    at uk.o....

This is probably because in XSpecCompiler#prepareSchematronDocument(XdmNode) , xslDependencyScanner has not been set an URIResolver.

This is a regression, it was working correctly in 2.0.0-RC5 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant