You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/01/04 13:30:25 UTC

[GitHub] [incubator-daffodil] jw3 commented on a change in pull request #463: Embedded Schematron

jw3 commented on a change in pull request #463:
URL: https://github.com/apache/incubator-daffodil/pull/463#discussion_r551317055



##########
File path: daffodil-schematron/src/test/resources/xsd/embedded-1.dfdl.xsd
##########
@@ -24,25 +24,26 @@
             <dfdl:format ref="GeneralFormat"/>
         </xs:appinfo>
         <xs:appinfo xmlns:sch="http://purl.oclc.org/dsdl/schematron">
-            <sch:pattern name="test-uuid">
+            <sch:pattern name="validate-uuid">
                 <sch:rule context="uuid">
-                    <sch:assert test="string-length(.)=36">uuid must be 36 chars</sch:assert>
-                    <sch:assert test="substring(.,9,1)='-' and substring(.,14,1)='-' and substring(.,19,1)='-' and substring(.,24,1)='-'">malformed uuid</sch:assert>
-                </sch:rule>
-            </sch:pattern>
-            <sch:pattern name="test-short-uuid">
-                <sch:rule context="short-uuid">
-                    <sch:assert test="string-length(.)=8">short uuid must be 8 chars</sch:assert>
+                    <sch:assert test="string-length(time_low)=8"><sch:name/> wrong length</sch:assert>

Review comment:
       from [iso_schematron_skeleton_for_saxon.xsl#L66-L70](https://github.com/Schematron/schematron/blob/master/trunk/schematron/code/iso_schematron_skeleton_for_saxon.xsl#L66-L70
   )
   ```
      Another tip is that Schematron provides an
      element <iso:ns> for declaring the namespaces and prefixes used in Xpaths in 
      attribute values; it does not extend the XML Namespaces mechanism: if a name
      in an XPath has a prefix, there must be an <iso:ns> element for that prefix; if
      a name in an XPath does not have a prefix, it is always in no namespace.
   ```
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org