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

[cli] Dereferencing samedoc reference returns schema document, not validation stylesheet #260

Open
dmj opened this issue Jun 10, 2022 · 1 comment
Labels
bug Something isn't working cli

Comments

@dmj
Copy link
Member

dmj commented Jun 10, 2022

Consider the following schema:

<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt3">
  <pattern>
    <rule context="*">
      <assert test="false()" properties="same-doc-ref"/>
    </rule>
  </pattern>
  <properties>
    <property id="same-doc-ref">
      <xsl:copy-of select="document('')" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>
    </property>
  </properties>
</schema>

When run with schxslt-cli the report contains a copy of the schema document in the svrl:property-reference.

One would expect that the xsl:copy-of is executed when running the validation stylesheet and thus returning the validation stylesheet.

When I compile the schema and run the schema directly from the commandline, document('') works as expected.

@dmj dmj added bug Something isn't working cli labels Jun 10, 2022
@dmj
Copy link
Member Author

dmj commented Jun 10, 2022

This might be a problem with schxslt/schxslt-java's Resolver implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

No branches or pull requests

1 participant