You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mu...@apache.org on 2023/01/29 05:54:38 UTC
[xalan-test] 02/02: committing improvements to, xalanj tests configuration
This is an automated email from the ASF dual-hosted git repository.
mukulg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/xalan-test.git
commit e76644c7ca4465c4daf43b0c1c67e8bd51e10365
Author: Mukul Gandhi <ga...@gmail.com>
AuthorDate: Sun Jan 29 11:24:07 2023 +0530
committing improvements to, xalanj tests configuration
---
tests/xsltc/attribset/attribset15.xml | 7 ++++
tests/xsltc/attribset/attribset15.xsl | 43 +++++++++++++++++++++++++
tests/xsltc/attribset/attribset1_ok.xsl | 32 ++++++++++++++++++
tests/xsltc/attribset/attribset23.xml | 3 ++
tests/xsltc/attribset/attribset23.xsl | 41 +++++++++++++++++++++++
tests/xsltc/attribset/expected_test_results.xml | 15 +++++++++
6 files changed, 141 insertions(+)
diff --git a/tests/xsltc/attribset/attribset15.xml b/tests/xsltc/attribset/attribset15.xml
new file mode 100644
index 00000000..4e670aa6
--- /dev/null
+++ b/tests/xsltc/attribset/attribset15.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<doc>
+<First at="Att1"/>
+<Second at="ped:Att2"/>
+<Third at="xyz:Att3"/>
+<Fourth at="xmlns"/>
+</doc>
\ No newline at end of file
diff --git a/tests/xsltc/attribset/attribset15.xsl b/tests/xsltc/attribset/attribset15.xsl
new file mode 100644
index 00000000..eb954544
--- /dev/null
+++ b/tests/xsltc/attribset/attribset15.xsl
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:ped="http://ped.test.com">
+
+ <!-- FileName: attribset15 -->
+ <!-- Document: http://www.w3.org/TR/xslt -->
+ <!-- DocVersion: 19991116 -->
+ <!-- Section: 7.1.3 Creating Attributes -->
+ <!-- Discretionary: name="attribute-name-not-QName" choice="ignore" -->
+ <!-- Creator: Paul Dick -->
+ <!-- Purpose: The name attribute is interpreted as an attribute value template.
+ It is an error if the value of the AVT is not a QNAME or the string "xmlns".
+ (Last two xsl:attributes test this) -->
+
+<xsl:template match="/">
+ <out xmlns:this="http://www.this.com">
+ <xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
+ <xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
+ <xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
+ <xsl:attribute name="xmlns">xmlns</xsl:attribute>
+ </out>
+</xsl:template>
+
+
+ <!--
+ * 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.
+ -->
+
+</xsl:stylesheet>
diff --git a/tests/xsltc/attribset/attribset1_ok.xsl b/tests/xsltc/attribset/attribset1_ok.xsl
new file mode 100644
index 00000000..5bfabdd5
--- /dev/null
+++ b/tests/xsltc/attribset/attribset1_ok.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:ped="http://ped.test.com">
+
+<xsl:template match="/">
+ <out xmlns:this="http://www.this.com">
+ <xsl:attribute name="{doc/First/@at}">First</xsl:attribute>
+ <xsl:attribute name="{doc/Second/@at}">Second</xsl:attribute>
+ <xsl:attribute name="{doc/Third/@at}">Third</xsl:attribute>
+ </out>
+</xsl:template>
+
+
+ <!--
+ * 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.
+ -->
+
+</xsl:stylesheet>
diff --git a/tests/xsltc/attribset/attribset23.xml b/tests/xsltc/attribset/attribset23.xml
new file mode 100644
index 00000000..bb54b129
--- /dev/null
+++ b/tests/xsltc/attribset/attribset23.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<doc>
+</doc>
\ No newline at end of file
diff --git a/tests/xsltc/attribset/attribset23.xsl b/tests/xsltc/attribset/attribset23.xsl
new file mode 100644
index 00000000..277e05df
--- /dev/null
+++ b/tests/xsltc/attribset/attribset23.xsl
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <!-- FileName: attribset23 -->
+ <!-- Document: http://www.w3.org/TR/xslt -->
+ <!-- DocVersion: 19991116 -->
+ <!-- Section: 7.1.3 Creating Attributes -->
+ <!-- Creator: Paul Dick -->
+ <!-- Purpose: XSLT processors may make use of the prefix of the QNAME specified
+ in the name attribute ... however they are not required to do so and, if
+ the prefix is xmlns, they must not do so ... this will not result in a
+ namespace declaration being output. -->
+
+<xsl:template match="/">
+ <root>
+ <Out>
+ <xsl:attribute name="xmlns:xsl" namespace="whatever">http://www.w3.org/1999/XSL/Transform</xsl:attribute>
+ </Out>
+ </root>
+</xsl:template>
+
+
+ <!--
+ * 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.
+ -->
+
+</xsl:stylesheet>
diff --git a/tests/xsltc/attribset/expected_test_results.xml b/tests/xsltc/attribset/expected_test_results.xml
new file mode 100644
index 00000000..a5b8fd98
--- /dev/null
+++ b/tests/xsltc/attribset/expected_test_results.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<expectedResults>
+ <file name="attribset1_ok.xsl">
+ <compileError>false</compileError>
+ <expected>pass</expected>
+ </file>
+ <file name="attribset15.xsl">
+ <compileError>true</compileError>
+ <expected>pass</expected>
+ </file>
+ <file name="attribset23.xsl">
+ <compileError>true</compileError>
+ <expected>pass</expected>
+ </file>
+</expectedResults>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org