You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by GitBox <gi...@apache.org> on 2018/02/16 17:12:05 UTC

[GitHub] stevedlawrence commented on a change in pull request #45: Added tests that clarify what we allow in appinfo annotations.

stevedlawrence commented on a change in pull request #45: Added tests that clarify what we allow in appinfo annotations.
URL: https://github.com/apache/incubator-daffodil/pull/45#discussion_r168816167
 
 

 ##########
 File path: daffodil-core/src/test/scala/org/apache/daffodil/dsom/TestAppinfoSyntax.scala
 ##########
 @@ -0,0 +1,243 @@
+/*
+ * 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.
+ */
+
+package org.apache.daffodil.dsom
+
+import scala.xml.Elem
+
+import org.apache.daffodil.xml.XMLUtils
+import org.junit.Assert._
+import org.junit.Test
+import org.apache.daffodil.compiler._
+import org.apache.daffodil.util.TestUtils
+import org.apache.daffodil.Implicits._
+
+/**
+ * Tests that verify that Daffodil works properly with other
+ * appinfo and non-native attribute annotations.
+ */
+class TestAppinfoSyntax {
+
+  val xsd = XMLUtils.XSD_NAMESPACE
+  val dfdl = XMLUtils.dfdlAppinfoSource // XMLUtils.DFDL_NAMESPACE
+
+  /**
+   * Test that non-native attributes can be placed on DFDL appinfo annotations.
+   */
+  @Test def testAppinfoWithNonNativeAttributes() {
+    val expected = "this is a non-native attribute"
+    val nnURI = "urn:nonNativeAttributeNamespaceURN"
+    val sc = <xs:schema xmlns:xs={ xsd } xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:foo={ nnURI }>
+               <xs:include schemaLocation="org/apache/daffodil/xsd/built-in-formats.xsd"/>
 
 Review comment:
   Should change to org/apache/daffodil/xsd/DFDLGeneralFormat.xsd and daffodiLTest1 to GeneralFormat. Same for other tests.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services