You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by gm...@apache.org on 2008/03/06 14:00:38 UTC
svn commit: r634254 [1/5] - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle:
./ resources/ resources/stylesheets/ resources/stylesheets/exsl/
resources/stylesheets/utils/ resources/themes/ resources/themes/common/
resources/...
Author: gmcdonald
Date: Thu Mar 6 05:00:31 2008
New Revision: 634254
URL: http://svn.apache.org/viewvc?rev=634254&view=rev
Log:
Add initial baetle plugin, with modifications, initial code due to Sina K Heshmati. Fix for FOR-1038
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/LICENSE.txt (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/NOTICE.txt (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/build.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/forrest.properties (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/input.xmap (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/locationmap.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources.xmap (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-document.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-issueSummary.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/date.format-date.template.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/date.parse-date.template.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/str.padding.template.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/locationmap-to-issueBundle.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/param.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/rss-to-baetle.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/utils/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/utils/date.format-date.template.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/utils/date.parse-date.template.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/utils/str.padding.template.xsl (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/common/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/common/html/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/common/html/baetle-embedded.ft (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/common/html/baetle-issue-summary.ft (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/common/html/content-baetle-link.ft (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/common/images/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/themes/common/images/baetle-rdf.png (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/classes/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/classes/CatalogManager.properties (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/locationmap.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/images/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/images/Thumbs.db (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/images/favicon.ico (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/images/icon.png (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/images/project-logo.gif (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/images/project.svg (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/index.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/samples/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/samples/index.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/site.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/content/xdocs/tabs.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/structurer/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/structurer/url/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/structurer/url/samples/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/structurer/url/samples/bissues/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/structurer/url/samples/bissues/pelt.fv (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/themes/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/themes/pelt/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/themes/pelt.fv (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/themes/pelt.fv.s
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/themes/pelt/panels/
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/resources/themes/pelt/panels/pelt-html.panel.xml.org
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/src/documentation/skinconf.xml (with props)
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/status.xml (with props)
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/LICENSE.txt
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/LICENSE.txt?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/LICENSE.txt (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/LICENSE.txt Thu Mar 6 05:00:31 2008
@@ -0,0 +1,211 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
+------------------------------------------------------------------------
+
+Apache Forrest includes a number of accompanying products with separate
+copyright notices and license terms. Your use of the source code for
+these products is subject to the terms and conditions of the relevant
+licenses. For more information, see: http://www.apache.org/legal/
+
+------------------------------------------------------------------------
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/LICENSE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/NOTICE.txt
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/NOTICE.txt?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/NOTICE.txt (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/NOTICE.txt Thu Mar 6 05:00:31 2008
@@ -0,0 +1,15 @@
+Apache Forrest
+Copyright 2002-2007 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+See also the file LICENSE.txt
+
+------------------------------------------------------------------------
+The purpose of this NOTICE.txt file is to contain notices that are
+required by the copyright owner and their license. Some of the
+accompanying products have an attribution requirement, so see below.
+Other accompanying products do not require attribution, so are not listed.
+
+------------------------------------------------------------------------
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/NOTICE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/build.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/build.xml?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/build.xml (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/build.xml Thu Mar 6 05:00:31 2008
@@ -0,0 +1,40 @@
+<?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.
+-->
+<project default="docs" basedir="." name="Forrest org.apache.forrest.plugin.input.baetle build file">
+ <property name="plugin-name" value="org.apache.forrest.plugin.input.baetle"/>
+ <property name="forrest.version" value="0.9"/>
+ <property name="type" value="input"/>
+ <property name="plugin-version" value="0.1"/>
+ <property name="description" value="Rendering Baetle, the RDF vocabulary to describe the content of bug databases"/>
+ <property name="author" value="Apache Forrest Project"/>
+ <property name="websiteURL" value="http://forrest.apache.org//pluginDocs/org.apache.forrest.plugin.input.baetle"/>
+ <property name="downloadURL" value="http://forrest.apache.org/plugins/plugins/"/>
+<!-- The plugin will only appear in the plugins list if pulish = true
+ <property name="publish" value="true"/> -->
+ <import file="../build.xml"/>
+<!-- Add any additional installation work here in the build target, for example:
+ <target name="build"
+ description="Extract the tools">
+ <unzip dest="${plugins.localDeploy-dir}/${plugin-name}/resources">
+ <fileset dir="tools">
+ <include name="pluginBionaryTools.zip"/>
+ </fileset>
+ </unzip>
+ </target>
+ -->
+</project>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/forrest.properties
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/forrest.properties?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/forrest.properties (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/forrest.properties Thu Mar 6 05:00:31 2008
@@ -0,0 +1,29 @@
+# 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.
+
+##############
+# This is a minimal properties file.
+# These are defaults, un-comment them only if you need to change them.
+# See the full set of default properties in a 'forrest seed-sample' site.
+# Copy properties from there as needed.
+##############
+
+# FIXME: FOR-785
+forrest.validate.skinconf=false
+
+project.required.plugins=org.apache.forrest.plugin.input.baetle,org.apache.forrest.plugin.output.inputModule,org.apache.forrest.plugin.input.projectInfo
+
+# Remove Disptacher stuff from plugin for now
+#org.apache.forrest.plugin.internal.dispatcher,org.apache.forrest.themes.core,
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/forrest.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/input.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/input.xmap?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/input.xmap (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/input.xmap Thu Mar 6 05:00:31 2008
@@ -0,0 +1,102 @@
+<?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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <!-- Components -->
+ <map:components>
+ <map:generators>
+ <map:generator name="directory"
+ src="org.apache.cocoon.generation.DirectoryGenerator"/>
+ </map:generators>
+ <map:selectors default="parameter">
+ <map:selector logger="sitemap.selector.parameter" name="parameter"
+ src="org.apache.cocoon.selection.ParameterSelector"/>
+ </map:selectors>
+ <map:transformers default="xslt">
+ <map:transformer name="cinclude"
+ src="org.apache.cocoon.transformation.CIncludeTransformer"/>
+ <map:transformer name="i18n"
+ src="org.apache.cocoon.transformation.I18nTransformer">
+ <catalogues default="projectInfo">
+ <catalogue id="projectInfo" name="ProjectInfoMessages"
+ location="{lm:project.translations}"/>
+ <catalogue id="other" name="OtherMessages"
+ location="{lm:project.translations}"/>
+ </catalogues>
+ <cache-at-startup>true</cache-at-startup>
+ </map:transformer>
+ </map:transformers>
+ <map:actions>
+ <map:action logger="sitemap.action.sourcetype" name="sourcetype"
+ src="org.apache.forrest.sourcetype.SourceTypeAction">
+ <sourcetype name="baetle">
+ <document-element namespace="http://www.w3.org/2004/02/baetle/core#"/>
+ </sourcetype>
+ </map:action>
+ </map:actions>
+ <map:pipes>
+ <map:pipe name="navigation"
+ src="org.apache.cocoon.components.pipeline.impl.ExpiresCachingProcessingPipeline">
+ <parameter name="cache-expires" value="0"/>
+ </map:pipe>
+ </map:pipes>
+ </map:components>
+ <!-- /Components -->
+
+ <!-- Pipelines -->
+ <map:pipelines>
+ <map:pipeline type="navigation">
+ <!-- Issue bundle not being used. Issues are generated on the fly -->
+ <map:match pattern="samples/bissues/issueBundle.xml">
+ <map:generate type="file" src="{properties:content}/locationmap.xml"/>
+ <map:transform src="{lm:baetle.transform.locationmap.issueBundle}"/>
+ <map:transform type="cinclude"/>
+ <map:serialize type="xml"/>
+ </map:match>
+ <map:match pattern="**.issueSummary.xml">
+ <map:generate src="cocoon://{1}.baetle.xml"/>
+ <map:transform src="{lm:baetle.transform.baetle.issueSummary}"/>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+
+ <map:pipeline>
+ <!-- Issues in RSS generated by JIRA -->
+ <map:match pattern="samples/bissues/*.source.xml">
+ <map:generate type="file" src="{lm:baetle.bissues.{1}}"/>
+ <map:serialize type="xml"/>
+ </map:match>
+ <!-- Issues in Baetle RDF/XML format -->
+ <map:match pattern="samples/bissues/**.baetle.xml">
+ <map:generate type="file" src="cocoon://samples/bissues/{1}.source.xml"/>
+ <map:transform src="{lm:baetle.transform.rss.baetle}"/>
+ <map:serialize type="xml"/>
+ </map:match>
+ <map:match pattern="samples/bissues/*.xml">
+ <map:generate type="file" src="cocoon://samples/bissues/{1}.baetle.xml"/>
+ <map:transform src="{lm:baetle.transform.baetle.document}"/>
+ <map:serialize type="xml-document"/>
+ </map:match>
+ <map:match pattern="samples/bissues/filter/*.source.xml">
+ <map:generate type="file" src="{lm:baetle.bissues.filter.{1}}"/>
+ <map:serialize type="xml"/>
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+ <!-- /Pipelines -->
+</map:sitemap>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/input.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/locationmap.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/locationmap.xml?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/locationmap.xml (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/locationmap.xml Thu Mar 6 05:00:31 2008
@@ -0,0 +1,52 @@
+<?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.
+-->
+<locationmap xmlns="http://apache.org/forrest/locationmap/1.0">
+ <components>
+ <matchers default="lm">
+ <matcher name="lm"
+ src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
+ </matchers>
+ <selectors default="exists">
+ <selector name="exists" logger="sitemap.selector.exists"
+ src="org.apache.forrest.sourceexists.SourceExistsSelector"/>
+ </selectors>
+ </components>
+ <locator>
+ <match pattern="baetle.transform.*.*">
+ <location src="resources/stylesheets/{1}-to-{2}.xsl"/>
+ </match>
+ <match pattern="resolvePluginContract.*.**">
+ <select type="exists">
+ <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.baetle/resources/themes/{properties:dispatcher.theme}/{1}/{2}.ft" />
+ <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.baetle/resources/themes/{properties:dispatcher.fallback.theme}/{1}/{2}.ft" />
+ </select>
+ </match>
+ <match pattern="resolvePluginThemes.*.**">
+ <select type="exists">
+ <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.baetle/resources/themes/{properties:dispatcher.theme}/{1}/{2}.{1}" />
+ <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.baetle/resources/themes/{properties:dispatcher.fallback.theme}/{1}/{2}.{1}" />
+ </select>
+ </match>
+ <match pattern="resolvePluginPanels.**">
+ <select type="exists">
+ <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.baetle/resources/themes/{properties:dispatcher.theme}/panels/{1}.panel.xml" />
+ <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.input.baetle/resources/themes/{properties:dispatcher.fallback.theme}/panels/{1}.panel.xml" />
+ </select>
+ </match>
+ </locator>
+</locationmap>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/locationmap.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources.xmap?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources.xmap (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources.xmap Thu Mar 6 05:00:31 2008
@@ -0,0 +1,29 @@
+<?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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+ <map:pipelines>
+ <map:pipeline>
+
+ <map:match pattern="samples/bissues/*.rdf">
+ <map:generate src="cocoon://samples/bissues/{1}.baetle.xml" />
+ <map:serialize type="xml"/>
+ </map:match>
+
+ </map:pipeline>
+ </map:pipelines>
+</map:sitemap>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-document.xsl?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-document.xsl (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-document.xsl Thu Mar 6 05:00:31 2008
@@ -0,0 +1,408 @@
+<?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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/"
+ xmlns:btl="http://xmlns.com/baetle/#"
+ xmlns:awol="http://bblfish.net/work/atom-owl/2006-06-06/#"
+ xmlns:dcterms="http://purl.org/dc/terms/"
+ xmlns:sioc="http://rdfs.org/sioc/ns#"
+ xmlns:date="http://exslt.org/dates-and-times"
+ extension-element-prefixes="date"
+ exclude-result-prefixes="awol dcterms dc foaf btl date sioc
+ rdf rdfs"
+ version="1.0">
+
+ <xsl:import href="utils/date.format-date.template.xsl"/>
+
+ <xsl:include href="param.xsl"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="rdf:RDF/btl:Issue"/>
+ </xsl:template>
+
+ <xsl:template match="btl:Issue">
+ <document>
+ <xsl:call-template name="baetle.issue.header"/>
+ <xsl:call-template name="baetle.issue.body"/>
+ </document>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.header">
+ <header>
+ <xsl:call-template name="baetle.issue.title"/>
+ </header>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.title">
+ <xsl:apply-templates select="btl:title|btl:subtitle"/>
+ </xsl:template>
+
+ <xsl:template match="btl:title">
+ <title>
+ <xsl:apply-templates/>
+ </title>
+ </xsl:template>
+
+ <xsl:template match="btl:summary">
+ <subtitle>
+ <xsl:apply-templates/>
+ </subtitle>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.body">
+ <body>
+ <xsl:apply-templates select="btl:description"/>
+ <xsl:if test="sioc:container_of/sioc:Post/sioc:content">
+ <section id="issue-comments">
+ <!-- FIXME: il8n ? -->
+ <title>Comments</title>
+ <xsl:apply-templates select="sioc:container_of/sioc:Post[sioc:content]"/>
+ </section>
+ </xsl:if>
+ <xsl:if test="sioc:container_of/sioc:Post/awol:content">
+ <section id="issue-attachments">
+ <!-- FIXME: il8n ? -->
+ <title>Attachments</title>
+ <xsl:apply-templates select="sioc:container_of/sioc:Post[awol:content]"/>
+ </section>
+ </xsl:if>
+ </body>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.summary">
+ <section id="issueSummary">
+ <title>Summary</title>
+ <table>
+ <xsl:call-template name="baetle.issue.component"/>
+ <xsl:call-template name="baetle.issue.affectsVersion"/>
+ <xsl:call-template name="baetle.issue.fixVersion"/>
+ <xsl:apply-templates mode="baetle.issue.summary"/>
+ </table>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="rdfs:label" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:value-of select="."/>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="rdf:type" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:call-template name="baetle.issue.resource.resolve"/>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:priority" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:call-template name="baetle.issue.resource.resolve"/>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:status" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:call-template name="baetle.issue.resource.resolve"/>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:resolution" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:call-template name="baetle.issue.resource.resolve"/>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:votes" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:value-of select="."/>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:reporter" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:choose>
+ <xsl:when test="foaf:Person">
+ <xsl:apply-templates mode="baetle.issue.summary"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="baetle.issue.resource.resolve"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:assigned_to" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:choose>
+ <xsl:when test="foaf:Person">
+ <xsl:apply-templates mode="baetle.issue.summary"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="baetle.issue.resource.resolve"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="foaf:Person" mode="baetle.issue.summary">
+ <xsl:if test="$baetle.issue.person.link != '0'">
+ <a href="{concat($sioc.user.prefix.uri, sioc:name/text())}"
+ title="{foaf:name/text()}">
+ <xsl:value-of select="foaf:name"/>
+ </a>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template match="btl:raised" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:call-template name="baetle.issue.date.format">
+ <xsl:with-param name="date" select="."/>
+ </xsl:call-template>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:updated" mode="baetle.issue.summary">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:call-template name="baetle.issue.summary.label"/>
+ <td class="value"><p>
+ <xsl:call-template name="baetle.issue.date.format">
+ <xsl:with-param name="date" select="."/>
+ </xsl:call-template>
+ </p></td>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="btl:summary" mode="baetle.issue.summary">
+ <p>
+ <xsl:apply-templates/>
+ </p>
+ </xsl:template>
+
+ <xsl:template match="btl:description|sioc:container_of|btl:title|btl:about|btl:target_milestone|btl:affects"
+ mode="baetle.issue.summary">
+ <!-- Ignore -->
+ </xsl:template>
+
+ <xsl:template match="btl:description">
+ <section>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <!-- FIXME: il8n ? -->
+ <title>Description</title>
+ <p>
+ <xsl:value-of select="." disable-output-escaping="yes"/>
+ </p>
+ </section>
+ </xsl:template>
+
+ <xsl:template match="sioc:content">
+ <p>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <xsl:apply-templates/>
+ </p>
+ </xsl:template>
+
+ <xsl:template match="sioc:Post[sioc:content]">
+ <xsl:variable name="author" select="substring-after(dc:creator/@rdf:resource, $sioc.user.prefix.uri)"/>
+ <dl>
+ <xsl:call-template name="baetle.issue.node.class.attrib"/>
+ <dt>
+ <a href="{dc:creator/@rdf:resource}" title="{$author}">
+ <xsl:value-of select="$author"/>
+ </a>
+ <xsl:text> - </xsl:text>
+ <xsl:call-template name="baetle.issue.date.format">
+ <xsl:with-param name="date" select="dcterms:created"/>
+ </xsl:call-template>
+ </dt>
+ <dd>
+ <xsl:apply-templates select="sioc:content"/>
+ </dd>
+ </dl>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.component">
+ <xsl:if test="btl:about">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib">
+ <xsl:with-param name="node" select="btl:about[1]"/>
+ </xsl:call-template>
+ <xsl:call-template name="baetle.issue.summary.label">
+ <xsl:with-param name="node" select="btl:about[1]"/>
+ </xsl:call-template>
+ <td class="value"><p>
+ <xsl:for-each select="btl:about">
+ <xsl:value-of select="translate(substring-after(@rdf:resource, $baetle.component.prefix.uri), '_', ' ')"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </p></td>
+ </tr>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.fixVersion">
+ <xsl:if test="btl:target_milestone">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib">
+ <xsl:with-param name="node" select="btl:target_milestone[1]"/>
+ </xsl:call-template>
+ <xsl:call-template name="baetle.issue.summary.label">
+ <xsl:with-param name="node" select="btl:target_milestone[1]"/>
+ </xsl:call-template>
+ <td class="value"><p>
+ <xsl:for-each select="btl:target_milestone">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </p></td>
+ </tr>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.affectsVersion">
+ <xsl:if test="btl:affects">
+ <tr>
+ <xsl:call-template name="baetle.issue.node.class.attrib">
+ <xsl:with-param name="node" select="btl:affects[1]"/>
+ </xsl:call-template>
+ <xsl:call-template name="baetle.issue.summary.label">
+ <xsl:with-param name="node" select="btl:affects[1]"/>
+ </xsl:call-template>
+ <td class="value"><p>
+ <xsl:for-each select="btl:affects">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </p></td>
+ </tr>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.node.class.attrib">
+ <xsl:param name="node" select="."/>
+ <xsl:attribute name="class">
+ <xsl:value-of select="local-name($node)"/>
+ </xsl:attribute>
+ </xsl:template>
+
+ <!-- This template assigns an appropriate label to a given property.
+ Will be replaced by il8n though.
+ Translation is preferred to be explicit -->
+ <xsl:template name="baetle.issue.summary.label">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="name" select="local-name($node)"/>
+ <td class="label" width="25%">
+ <p><strong>
+ <xsl:choose>
+ <xsl:when test="$name = 'label'">Label</xsl:when>
+ <xsl:when test="$name = 'type'">Type</xsl:when>
+ <xsl:when test="$name = 'priority'">Priority</xsl:when>
+ <xsl:when test="$name = 'status'">Status</xsl:when>
+ <xsl:when test="$name = 'resolution'">Resolution</xsl:when>
+ <xsl:when test="$name = 'assigned_to'">Assignee</xsl:when>
+ <xsl:when test="$name = 'reporter'">Reporter</xsl:when>
+ <xsl:when test="$name = 'raised'">Issue Raised</xsl:when>
+ <xsl:when test="$name = 'updated'">Last Updated</xsl:when>
+ <xsl:when test="$name = 'affects'">Affected Version(s)</xsl:when>
+ <xsl:when test="$name = 'target_milestone'">Fix Version(s)</xsl:when>
+ <xsl:when test="$name = 'about'">Component</xsl:when>
+ <xsl:when test="$name = 'votes'">Votes</xsl:when>
+ <xsl:when test="$name = 'summary'">Summary</xsl:when>
+ <xsl:when test="$name = 'title'">Title</xsl:when>
+ <xsl:otherwise>Unknown Property</xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>: </xsl:text>
+ </strong></p>
+ </td>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.resource.resolve">
+ <xsl:if test="@rdf:resource">
+ <xsl:variable name="value" select="substring-after(@rdf:resource,
+ $baetle.ns.uri)"/>
+ <xsl:choose>
+ <xsl:when test="$value = 'Bug'">Bug</xsl:when>
+ <xsl:when test="$value = 'Fixed'">Fixed</xsl:when>
+ <xsl:when test="$value = 'Minor'">Minor</xsl:when>
+ <xsl:when test="$value = 'Major'">Major</xsl:when>
+ <xsl:when test="$value = 'Unresolved'">Unresolved</xsl:when>
+ <xsl:when test="$value = 'Unassigned'">Unassigned</xsl:when>
+ <xsl:when test="$value = 'Open'">Open</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$value"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="baetle.issue.date.format">
+ <xsl:param name="date"/>
+ <!--
+ <xsl:call-template name="date:format-date">
+ <xsl:with-param name="date-time" select="$date"/>
+ <xsl:with-param name="format" select="'EEE, dd MMM yyyy hh:mm'"/>
+ </xsl:call-template>
+ -->
+ <xsl:value-of select="$date"/>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-document.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-issueSummary.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-issueSummary.xsl?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-issueSummary.xsl (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-issueSummary.xsl Thu Mar 6 05:00:31 2008
@@ -0,0 +1,34 @@
+<?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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:btl="http://xmlns.com/baetle/#"
+ exclude-result-prefixes="btl"
+ version="1.0">
+
+ <xsl:include href="baetle-to-document.xsl"/>
+
+ <xsl:template match="/*/btl:Issue">
+ <section id="issueDetails">
+ <title>Issue Details</title>
+ <table>
+ <xsl:apply-templates mode="baetle.issue.summary"/>
+ </table>
+ </section>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/baetle-to-issueSummary.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/date.format-date.template.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/date.format-date.template.xsl?rev=634254&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/date.format-date.template.xsl (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/date.format-date.template.xsl Thu Mar 6 05:00:31 2008
@@ -0,0 +1,508 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:date="http://exslt.org/dates-and-times"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="date str">
+
+<xsl:import href="str.padding.template.xsl" />
+
+<date:months>
+ <date:month length="31" abbr="Jan">January</date:month>
+ <date:month length="28" abbr="Feb">February</date:month>
+ <date:month length="31" abbr="Mar">March</date:month>
+ <date:month length="30" abbr="Apr">April</date:month>
+ <date:month length="31" abbr="May">May</date:month>
+ <date:month length="30" abbr="Jun">June</date:month>
+ <date:month length="31" abbr="Jul">July</date:month>
+ <date:month length="31" abbr="Aug">August</date:month>
+ <date:month length="30" abbr="Sep">September</date:month>
+ <date:month length="31" abbr="Oct">October</date:month>
+ <date:month length="30" abbr="Nov">November</date:month>
+ <date:month length="31" abbr="Dec">December</date:month>
+</date:months>
+
+<date:days>
+ <date:day abbr="Sun">Sunday</date:day>
+ <date:day abbr="Mon">Monday</date:day>
+ <date:day abbr="Tue">Tuesday</date:day>
+ <date:day abbr="Wed">Wednesday</date:day>
+ <date:day abbr="Thu">Thursday</date:day>
+ <date:day abbr="Fri">Friday</date:day>
+ <date:day abbr="Sat">Saturday</date:day>
+</date:days>
+
+<xsl:template name="date:format-date">
+ <xsl:param name="date-time" />
+ <xsl:param name="pattern" />
+ <xsl:variable name="formatted">
+ <xsl:choose>
+ <xsl:when test="starts-with($date-time, '---')">
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="'NaN'" />
+ <xsl:with-param name="month" select="'NaN'" />
+ <xsl:with-param name="day" select="number(substring($date-time, 4, 2))" />
+ <xsl:with-param name="pattern" select="$pattern" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="starts-with($date-time, '--')">
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="'NaN'" />
+ <xsl:with-param name="month" select="number(substring($date-time, 3, 2))" />
+ <xsl:with-param name="day" select="number(substring($date-time, 6, 2))" />
+ <xsl:with-param name="pattern" select="$pattern" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="neg" select="starts-with($date-time, '-')" />
+ <xsl:variable name="no-neg">
+ <xsl:choose>
+ <xsl:when test="$neg or starts-with($date-time, '+')">
+ <xsl:value-of select="substring($date-time, 2)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$date-time" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="no-neg-length" select="string-length($no-neg)" />
+ <xsl:variable name="timezone">
+ <xsl:choose>
+ <xsl:when test="substring($no-neg, $no-neg-length) = 'Z'">Z</xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="tz" select="substring($no-neg, $no-neg-length - 5)" />
+ <xsl:if test="(substring($tz, 1, 1) = '-' or
+ substring($tz, 1, 1) = '+') and
+ substring($tz, 4, 1) = ':'">
+ <xsl:value-of select="$tz" />
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="not(string($timezone)) or
+ $timezone = 'Z' or
+ (substring($timezone, 2, 2) <= 23 and
+ substring($timezone, 5, 2) <= 59)">
+ <xsl:variable name="dt" select="substring($no-neg, 1, $no-neg-length - string-length($timezone))" />
+ <xsl:variable name="dt-length" select="string-length($dt)" />
+ <xsl:choose>
+ <xsl:when test="substring($dt, 3, 1) = ':' and
+ substring($dt, 6, 1) = ':'">
+ <xsl:variable name="hour" select="substring($dt, 1, 2)" />
+ <xsl:variable name="min" select="substring($dt, 4, 2)" />
+ <xsl:variable name="sec" select="substring($dt, 7)" />
+ <xsl:if test="$hour <= 23 and
+ $min <= 59 and
+ $sec <= 60">
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="'NaN'" />
+ <xsl:with-param name="month" select="'NaN'" />
+ <xsl:with-param name="day" select="'NaN'" />
+ <xsl:with-param name="hour" select="$hour" />
+ <xsl:with-param name="minute" select="$min" />
+ <xsl:with-param name="second" select="$sec" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="$pattern" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="year" select="substring($dt, 1, 4) * (($neg * -2) + 1)" />
+ <xsl:choose>
+ <xsl:when test="not(number($year))" />
+ <xsl:when test="$dt-length = 4">
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="$pattern" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="substring($dt, 5, 1) = '-'">
+ <xsl:variable name="month" select="substring($dt, 6, 2)" />
+ <xsl:choose>
+ <xsl:when test="not($month <= 12)" />
+ <xsl:when test="$dt-length = 7">
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="$pattern" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="substring($dt, 8, 1) = '-'">
+ <xsl:variable name="day" select="substring($dt, 9, 2)" />
+ <xsl:if test="$day <= 31">
+ <xsl:choose>
+ <xsl:when test="$dt-length = 10">
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="day" select="$day" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="$pattern" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="substring($dt, 11, 1) = 'T' and
+ substring($dt, 14, 1) = ':' and
+ substring($dt, 17, 1) = ':'">
+ <xsl:variable name="hour" select="substring($dt, 12, 2)" />
+ <xsl:variable name="min" select="substring($dt, 15, 2)" />
+ <xsl:variable name="sec" select="substring($dt, 18)" />
+ <xsl:if test="$hour <= 23 and
+ $min <= 59 and
+ $sec <= 60">
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="day" select="$day" />
+ <xsl:with-param name="hour" select="$hour" />
+ <xsl:with-param name="minute" select="$min" />
+ <xsl:with-param name="second" select="$sec" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="$pattern" />
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$formatted" />
+</xsl:template>
+
+<xsl:template name="date:_format-date">
+ <xsl:param name="year" />
+ <xsl:param name="month" select="1" />
+ <xsl:param name="day" select="1" />
+ <xsl:param name="hour" select="0" />
+ <xsl:param name="minute" select="0" />
+ <xsl:param name="second" select="0" />
+ <xsl:param name="timezone" select="'Z'" />
+ <xsl:param name="pattern" select="''" />
+ <xsl:variable name="char" select="substring($pattern, 1, 1)" />
+ <xsl:choose>
+ <xsl:when test="not($pattern)" />
+ <xsl:when test='$char = "'"'>
+ <xsl:choose>
+ <xsl:when test='substring($pattern, 2, 1) = "'"'>
+ <xsl:text>'</xsl:text>
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="day" select="$day" />
+ <xsl:with-param name="hour" select="$hour" />
+ <xsl:with-param name="minute" select="$minute" />
+ <xsl:with-param name="second" select="$second" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="substring($pattern, 3)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="literal-value" select='substring-before(substring($pattern, 2), "'")' />
+ <xsl:value-of select="$literal-value" />
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="day" select="$day" />
+ <xsl:with-param name="hour" select="$hour" />
+ <xsl:with-param name="minute" select="$minute" />
+ <xsl:with-param name="second" select="$second" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="substring($pattern, string-length($literal-value) + 2)" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="not(contains('abcdefghjiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $char))">
+ <xsl:value-of select="$char" />
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="day" select="$day" />
+ <xsl:with-param name="hour" select="$hour" />
+ <xsl:with-param name="minute" select="$minute" />
+ <xsl:with-param name="second" select="$second" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="substring($pattern, 2)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not(contains('GyMdhHmsSEDFwWakKz', $char))">
+ <xsl:message>
+ Invalid token in format string: <xsl:value-of select="$char" />
+ </xsl:message>
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="day" select="$day" />
+ <xsl:with-param name="hour" select="$hour" />
+ <xsl:with-param name="minute" select="$minute" />
+ <xsl:with-param name="second" select="$second" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="substring($pattern, 2)" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="next-different-char" select="substring(translate($pattern, $char, ''), 1, 1)" />
+ <xsl:variable name="pattern-length">
+ <xsl:choose>
+ <xsl:when test="$next-different-char">
+ <xsl:value-of select="string-length(substring-before($pattern, $next-different-char))" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="string-length($pattern)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$char = 'G'">
+ <xsl:choose>
+ <xsl:when test="string($year) = 'NaN'" />
+ <xsl:when test="$year > 0">AD</xsl:when>
+ <xsl:otherwise>BC</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'M'">
+ <xsl:choose>
+ <xsl:when test="string($month) = 'NaN'" />
+ <xsl:when test="$pattern-length >= 3">
+ <xsl:variable name="month-node" select="document('')/*/date:months/date:month[number($month)]" />
+ <xsl:choose>
+ <xsl:when test="$pattern-length >= 4">
+ <xsl:value-of select="$month-node" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$month-node/@abbr" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$pattern-length = 2">
+ <xsl:value-of select="format-number($month, '00')" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$month" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'E'">
+ <xsl:choose>
+ <xsl:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'" />
+ <xsl:otherwise>
+ <xsl:variable name="month-days" select="sum(document('')/*/date:months/date:month[position() < $month]/@length)" />
+ <xsl:variable name="days" select="$month-days + $day + boolean(((not($year mod 4) and $year mod 100) or not($year mod 400)) and $month > 2)" />
+ <xsl:variable name="y-1" select="$year - 1" />
+ <xsl:variable name="dow"
+ select="(($y-1 + floor($y-1 div 4) -
+ floor($y-1 div 100) + floor($y-1 div 400) +
+ $days)
+ mod 7) + 1" />
+ <xsl:variable name="day-node" select="document('')/*/date:days/date:day[number($dow)]" />
+ <xsl:choose>
+ <xsl:when test="$pattern-length >= 4">
+ <xsl:value-of select="$day-node" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$day-node/@abbr" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'a'">
+ <xsl:choose>
+ <xsl:when test="string($hour) = 'NaN'" />
+ <xsl:when test="$hour >= 12">PM</xsl:when>
+ <xsl:otherwise>AM</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'z'">
+ <xsl:choose>
+ <xsl:when test="$timezone = 'Z'">UTC</xsl:when>
+ <xsl:otherwise>UTC<xsl:value-of select="$timezone" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="padding">
+ <xsl:choose>
+ <xsl:when test="$pattern-length > 10">
+ <xsl:call-template name="str:padding">
+ <xsl:with-param name="length" select="$pattern-length" />
+ <xsl:with-param name="chars" select="'0'" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring('0000000000', 1, $pattern-length)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$char = 'y'">
+ <xsl:choose>
+ <xsl:when test="string($year) = 'NaN'" />
+ <xsl:when test="$pattern-length > 2"><xsl:value-of select="format-number($year, $padding)" /></xsl:when>
+ <xsl:otherwise><xsl:value-of select="format-number(substring($year, string-length($year) - 1), $padding)" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'd'">
+ <xsl:choose>
+ <xsl:when test="string($day) = 'NaN'" />
+ <xsl:otherwise><xsl:value-of select="format-number($day, $padding)" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'h'">
+ <xsl:variable name="h" select="$hour mod 12" />
+ <xsl:choose>
+ <xsl:when test="string($hour) = 'NaN'"></xsl:when>
+ <xsl:when test="$h"><xsl:value-of select="format-number($h, $padding)" /></xsl:when>
+ <xsl:otherwise><xsl:value-of select="format-number(12, $padding)" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'H'">
+ <xsl:choose>
+ <xsl:when test="string($hour) = 'NaN'" />
+ <xsl:otherwise>
+ <xsl:value-of select="format-number($hour, $padding)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'k'">
+ <xsl:choose>
+ <xsl:when test="string($hour) = 'NaN'" />
+ <xsl:when test="$hour"><xsl:value-of select="format-number($hour, $padding)" /></xsl:when>
+ <xsl:otherwise><xsl:value-of select="format-number(24, $padding)" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'K'">
+ <xsl:choose>
+ <xsl:when test="string($hour) = 'NaN'" />
+ <xsl:otherwise><xsl:value-of select="format-number($hour mod 12, $padding)" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'm'">
+ <xsl:choose>
+ <xsl:when test="string($minute) = 'NaN'" />
+ <xsl:otherwise>
+ <xsl:value-of select="format-number($minute, $padding)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 's'">
+ <xsl:choose>
+ <xsl:when test="string($second) = 'NaN'" />
+ <xsl:otherwise>
+ <xsl:value-of select="format-number($second, $padding)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'S'">
+ <xsl:choose>
+ <xsl:when test="string($second) = 'NaN'" />
+ <xsl:otherwise>
+ <xsl:value-of select="format-number(substring-after($second, '.'), $padding)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="$char = 'F'">
+ <xsl:choose>
+ <xsl:when test="string($day) = 'NaN'" />
+ <xsl:otherwise>
+ <xsl:value-of select="floor($day div 7) + 1" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="string($year) = 'NaN' or string($month) = 'NaN' or string($day) = 'NaN'" />
+ <xsl:otherwise>
+ <xsl:variable name="month-days" select="sum(document('')/*/date:months/date:month[position() < $month]/@length)" />
+ <xsl:variable name="days" select="$month-days + $day + boolean(((not($year mod 4) and $year mod 100) or not($year mod 400)) and $month > 2)" />
+ <xsl:choose>
+ <xsl:when test="$char = 'D'">
+ <xsl:value-of select="format-number($days, $padding)" />
+ </xsl:when>
+ <xsl:when test="$char = 'w'">
+ <xsl:call-template name="date:_week-in-year">
+ <xsl:with-param name="days" select="$days" />
+ <xsl:with-param name="year" select="$year" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$char = 'W'">
+ <xsl:variable name="y-1" select="$year - 1" />
+ <xsl:variable name="day-of-week"
+ select="(($y-1 + floor($y-1 div 4) -
+ floor($y-1 div 100) + floor($y-1 div 400) +
+ $days)
+ mod 7) + 1" />
+ <xsl:choose>
+ <xsl:when test="($day - $day-of-week) mod 7">
+ <xsl:value-of select="floor(($day - $day-of-week) div 7) + 2" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="floor(($day - $day-of-week) div 7) + 1" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="date:_format-date">
+ <xsl:with-param name="year" select="$year" />
+ <xsl:with-param name="month" select="$month" />
+ <xsl:with-param name="day" select="$day" />
+ <xsl:with-param name="hour" select="$hour" />
+ <xsl:with-param name="minute" select="$minute" />
+ <xsl:with-param name="second" select="$second" />
+ <xsl:with-param name="timezone" select="$timezone" />
+ <xsl:with-param name="pattern" select="substring($pattern, $pattern-length + 1)" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="date:_week-in-year">
+ <xsl:param name="days" />
+ <xsl:param name="year" />
+ <xsl:variable name="y-1" select="$year - 1" />
+ <!-- this gives the day of the week, counting from Sunday = 0 -->
+ <xsl:variable name="day-of-week"
+ select="($y-1 + floor($y-1 div 4) -
+ floor($y-1 div 100) + floor($y-1 div 400) +
+ $days)
+ mod 7" />
+ <!-- this gives the day of the week, counting from Monday = 1 -->
+ <xsl:variable name="dow">
+ <xsl:choose>
+ <xsl:when test="$day-of-week"><xsl:value-of select="$day-of-week" /></xsl:when>
+ <xsl:otherwise>7</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="start-day" select="($days - $dow + 7) mod 7" />
+ <xsl:variable name="week-number" select="floor(($days - $dow + 7) div 7)" />
+ <xsl:choose>
+ <xsl:when test="$start-day >= 4">
+ <xsl:value-of select="$week-number + 1" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="not($week-number)">
+ <xsl:call-template name="date:_week-in-year">
+ <xsl:with-param name="days" select="365 + ((not($y-1 mod 4) and $y-1 mod 100) or not($y-1 mod 400))" />
+ <xsl:with-param name="year" select="$y-1" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$week-number" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.baetle/resources/stylesheets/exsl/date.format-date.template.xsl
------------------------------------------------------------------------------
svn:eol-style = native