Author: thorsten
Date: Fri Oct 17 05:01:59 2008
New Revision: 705572
URL: http://svn.apache.org/viewvc?rev=705572&view=rev
Log:
Adding testing file for a bug I found with xsl:sort. Using xsl:sort in the
dispatcher has thrown a NPE from xalan. It seems to me like a xalan bug. See
http://markmail.org/message/5bekq5goyeik7q7l for background information.
Added:
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.contract.xml
(with props)
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.xml
(with props)
Modified:
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/master.structurer.xml
Modified:
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/master.structurer.xml
URL:
http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/master.structurer.xml?rev=705572&r1=705571&r2=705572&view=diff
==============================================================================
---
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/master.structurer.xml
(original)
+++
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/master.structurer.xml
Fri Oct 17 05:01:59 2008
@@ -25,6 +25,9 @@
</forrest:property>
</forrest:contract>
</forrest:hook>
+ <forrest:hook id="sort">
+ <forrest:contract name="sort"
dataURI="/org/apache/forrest/dispatcher/sort.xml"/>
+ </forrest:hook>
</forrest:hook>
</forrest:structure>
<forrest:structure type="xml" hooksXpath="/">
Added:
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.contract.xml
URL:
http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.contract.xml?rev=705572&view=auto
==============================================================================
---
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.contract.xml
(added)
+++
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.contract.xml
Fri Oct 17 05:01:59 2008
@@ -0,0 +1,43 @@
+<?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.
+ -->
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0" name="sort">
+ <description>
+ <p> This is just a sort contract, it will output something but
+ *nothing* in special. It should just serve to explain a wee bit
+ contracts and what you can do with them.</p>
+ </description>
+ <usage>
+<![CDATA[<forrest:contract name="sort" dataURI="path"/>]]>
+ </usage>
+ <forrest:template name="sort" inputFormat="xsl">
+ <xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <forrest:content
xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <forrest:part>
+ <xsl:apply-templates/>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ <xsl:template match="root">
+ <xsl:apply-templates select="child">
+ <xsl:sort select="@prioridad" data-type="number"/>
+ </xsl:apply-templates>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
\ No newline at end of file
Propchange:
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.contract.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.xml
URL:
http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.xml?rev=705572&view=auto
==============================================================================
---
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.xml
(added)
+++
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.xml
Fri Oct 17 05:01:59 2008
@@ -0,0 +1,32 @@
+<?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.
+ -->
+<root>
+ <child prioridad="2">
+ 2
+ </child>
+ <child prioridad="3">
+ 3
+ </child>
+ <child prioridad="1">
+ 1
+ </child>
+ <child prioridad="5">
+ 5
+ </child>
+ <child prioridad="4">
+ 4
+ </child>
+</root>
\ No newline at end of file
Propchange:
forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/testing/org/apache/forrest/dispatcher/sort.xml
------------------------------------------------------------------------------
svn:eol-style = native