You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, sch:pattern/@documents takes a list of IRIs, or string variables.
I propose that it shoukd also allow variables names that are documents.
For example, at its simplest:
'''
<sch:let name="xxx" as="document()" >
< x/>
</sch:let>
<sch:pattern document=" $xxx " > ...
'''
This would address three issues:
The document could be selected by an Xpath, allowing use of document-available() for better fallback. For example, if the extetnal document is not available, the variable is a document with a fallback element < no-doc/> which can then have a rule/report in the pattern so the SVRL reflects that no document was found.
The document could be JSON parsed by the XPath3 functiom, or csv parsed by some function provided, or constructed ftom multiple inputs
There would be no risk that if multiple patterns validate the same @document, that document gets read in multiple times.
I don't think this would be hard to implement: iterate over each token,
if the token does not start with $ treat it as an IRI,
else if it starts with $ then check if the variable's contains a document() and use that,
else take the string value of the variable as an IRI.
Rick
The text was updated successfully, but these errors were encountered:
I think this is not correct: The @documents attribute contains an expression that evaluates to a sequence of IRIs. The envisioned use-case for @documents is a manifest file that enumerates a list of other files. If the files are e.g. referenced by an <link> element with an @href attribute, then <pattern documents="link/@href"> would return the sequence of IRIs of the documents you want to validate.
At the moment, sch:pattern/@documents takes a list of IRIs, or string variables.
I propose that it shoukd also allow variables names that are documents.
For example, at its simplest:
'''
<sch:let name="xxx" as="document()" >
< x/>
</sch:let>
<sch:pattern document=" $xxx " > ...
'''
This would address three issues:
I don't think this would be hard to implement: iterate over each token,
if the token does not start with $ treat it as an IRI,
else if it starts with $ then check if the variable's contains a document() and use that,
else take the string value of the variable as an IRI.
Rick
The text was updated successfully, but these errors were encountered: