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



##########
File path: daffodil-schematron/src/test/resources/xsd/extends-1.dfdl.xsd
##########
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
+           xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/";
+           xmlns:sch="http://purl.oclc.org/dsdl/schematron";>
+
+    <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+    <xs:annotation>
+        <xs:appinfo source="http://www.ogf.org/dfdl/";>
+            <dfdl:format ref="GeneralFormat"/>
+        </xs:appinfo>
+        <xs:appinfo>
+            <sch:pattern>
+                <sch:rule abstract="true" id="blank">
+                    <sch:assert test="string-length(.) > 0"><sch:name/> is 
blank.</sch:assert>

Review comment:
       Thanks. What about the namespaces for the function names? 
   
   The reason I focus on this is that DFDL expressions are XPath 2.0 derived, 
though not identically those, but DFDL expressions the function names are in a 
namespace, which usually requires a namespace prefix like "fn:". 
   
   This inconsistency is manageable, but unfortunate if expressions like these 
that could, in principle be either DFDL expressions or schematron expressions, 
can't be cut/pasted between schematron rules and say, DFDL asserts, because the 
expression languages are that different. 
   
   This really only matters for very simple expressions. DFDL expressions 
basically can't do anything that can't execute in constant time. If it involves 
searching, counting, or really any sort of iteration over the infoset tree, 
then DFDL expressions don't allow it for the most part, and Daffodil doesn't 
implement it. Those are the kinds of things that you need schematron for.  So 
DFDL expressions can already check lengths, but a query like "all FOO elements 
must be beneath a BAR element" or "there must be 3 or more FOO children of each 
QUUX element" can't be expressed. 
   




----------------------------------------------------------------
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:
[email protected]


Reply via email to