RE: Schematron with relative paths for document functions

Hi,

The first thing I can think of is that the XProc processor does not keep the base URI of the Schematron schema, or - if the processor uses the XSLT Schematron implementation - that something goes wrong with base URIs between the individual Schematron XSLT phases.

Which XProc processor are you using?

Regards,
Vojtech


--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech


> -----Original Message-----
> From: Robert Stuart [mailto:RobertStuart@crystalMatrixSoftware.com]
> Sent: Tuesday, February 21, 2012 5:21 PM
> To: xproc-dev@w3.org
> Subject: Schematron with relative paths for document functions
> 
> I have schematron that has configuration files it reads into variables
> such as
> 
> <sch:let name="countriesList"
> 
> value="document('../../CVE/Countries.xml')//cve:CVE/cve:Enumeration/cve
> :Term/cve:Value"/>
> 
> The ../.. path is relative to where the .sch file is. This works fine
> for executing the schematron from oxygen but when I put
> 
> <p:validate-with-schematron>
>             <p:documentation>
>                 Schematron validate the source doc against the
> schematron.
>             </p:documentation>
>             <p:input port="schema">
>                 <p:document href="../Schematron/test.sch"/>
>             </p:input>
>             <p:with-param name="allow-foreign" select="'true'"/>
>         </p:validate-with-schematron>
> 
> I get errors that Countries.xml does not exist at a path that would
> coincide with starting at the location of the input document not the
> .sch file.
> 
> What obvious thing am I missing?
> 
> Bob Stuart

Received on Wednesday, 22 February 2012 07:50:02 UTC