You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2013/12/07 03:25:45 UTC
svn commit: r1548779 - in /incubator/vxquery/trunk/vxquery/vxquery-core: ./
src/main/java/org/apache/vxquery/functions/ src/main/xslt/
Author: prestonc
Date: Sat Dec 7 02:25:45 2013
New Revision: 1548779
URL: http://svn.apache.org/r1548779
Log:
Added a OPERATION_COLLECTION to hold a list of operators function definitions. Used to help remove redundant treat statements.
Added:
incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.fncollection_begin (with props)
incubator/vxquery/trunk/vxquery/vxquery-core/src/main/xslt/generate-op-collection.xsl (with props)
Modified:
incubator/vxquery/trunk/vxquery/vxquery-core/build-xslt.xml
incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.footer
Modified: incubator/vxquery/trunk/vxquery/vxquery-core/build-xslt.xml
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/build-xslt.xml?rev=1548779&r1=1548778&r2=1548779&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/build-xslt.xml (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/build-xslt.xml Sat Dec 7 02:25:45 2013
@@ -34,10 +34,13 @@
<xslt classpath="${classpath.xslt}" processor="trax" in="${src.code.dir}/org/apache/vxquery/functions/builtin-operators.xml" out="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java.qnames" style="${xslt.dir}/generate-op-qnames.xsl"/>
<xslt classpath="${classpath.xslt}" processor="trax" in="${src.code.dir}/org/apache/vxquery/functions/builtin-operators.xml" out="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java.operators" style="${xslt.dir}/generate-op-defns.xsl"/>
- <concat destfile="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java">
+ <xslt classpath="${classpath.xslt}" processor="trax" in="${src.code.dir}/org/apache/vxquery/functions/builtin-operators.xml" out="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java.operator_collection" style="${xslt.dir}/generate-op-collection.xsl"/>
+ <concat destfile="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java">
<fileset file="${src.code.dir}/org/apache/vxquery/functions/BuiltinOperators.java.header"/>
<fileset file="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java.qnames"/>
<fileset file="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java.operators"/>
+ <fileset file="${src.code.dir}/org/apache/vxquery/functions/BuiltinOperators.java.fncollection_begin"/>
+ <fileset file="${build.gen-src.dir}/org/apache/vxquery/functions/BuiltinOperators.java.operator_collection"/>
<fileset file="${src.code.dir}/org/apache/vxquery/functions/BuiltinOperators.java.footer"/>
</concat>
</target>
Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.fncollection_begin
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.fncollection_begin?rev=1548779&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.fncollection_begin (added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.fncollection_begin Sat Dec 7 02:25:45 2013
@@ -0,0 +1,20 @@
+/*
+* 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.
+*/
+ public static final java.util.List<org.apache.vxquery.functions.Function> OPERATOR_COLLECTION;
+
+ static {
+ java.util.List<org.apache.vxquery.functions.Function> temp = new java.util.ArrayList<org.apache.vxquery.functions.Function>();
Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.fncollection_begin
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.footer
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.footer?rev=1548779&r1=1548778&r2=1548779&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.footer (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/functions/BuiltinOperators.java.footer Sat Dec 7 02:25:45 2013
@@ -15,5 +15,7 @@
* limitations under the License.
*/
/* Footer begin */
+ OPERATOR_COLLECTION = java.util.Collections.unmodifiableList(temp);
+ }
}
-/* Footer end */
+/* Footer end */
\ No newline at end of file
Added: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/xslt/generate-op-collection.xsl
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/xslt/generate-op-collection.xsl?rev=1548779&view=auto
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/xslt/generate-op-collection.xsl (added)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/xslt/generate-op-collection.xsl Sat Dec 7 02:25:45 2013
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+ 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:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+ <xsl:output method="xml" omit-xml-declaration="yes"/>
+
+ <xsl:template match="/">
+ <xsl:for-each select="/operators/operator">
+ temp.add(<xsl:value-of select="translate(substring-after(@name, ':'), 'abcdefghijklmnopqrstuvwxyz-:', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ__')"/>);
+ </xsl:for-each>
+ </xsl:template>
+</xsl:transform>
Propchange: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/xslt/generate-op-collection.xsl
------------------------------------------------------------------------------
svn:eol-style = native