You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by ni...@apache.org on 2004/09/07 11:12:05 UTC
svn commit: rev 43459 - in forrest/trunk/src/core: . context context/resources/stylesheets
Author: nicolaken
Date: Tue Sep 7 02:12:04 2004
New Revision: 43459
Added:
forrest/trunk/src/core/context/resources/stylesheets/strip-doctype.xsl (contents, props changed)
Modified:
forrest/trunk/src/core/context/sitemap.xmap
forrest/trunk/src/core/forrest.build.xml
Log:
Strip the doctype from skinconf before using it.
Should fix FOR-279 and FOR-225
Added: forrest/trunk/src/core/context/resources/stylesheets/strip-doctype.xsl
==============================================================================
--- (empty file)
+++ forrest/trunk/src/core/context/resources/stylesheets/strip-doctype.xsl Tue Sep 7 02:12:04 2004
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsl:output
+ omit-xml-declaration="no"
+ method="xml"
+ indent="yes"/>
+
+ <!-- Identity transformation template -->
+ <xsl:template match="/ | @* | * | comment() | processing-instruction() | text()">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Modified: forrest/trunk/src/core/context/sitemap.xmap
==============================================================================
--- forrest/trunk/src/core/context/sitemap.xmap (original)
+++ forrest/trunk/src/core/context/sitemap.xmap Tue Sep 7 02:12:04 2004
@@ -349,6 +349,7 @@
<map:pipeline internal-only="false">
<map:match pattern="skinconf.xml">
<map:generate src="{project:skinconf}" />
+ <map:transform src="{forrest:stylesheets}/strip-doctype.xsl"/>
<map:transform src="{forrest:stylesheets}/upgrade-skinconf.xsl"/>
<map:select type="exists">
<map:when test="{project:skins-dir}{forrest:skin}/skinconf.xsl">
Modified: forrest/trunk/src/core/forrest.build.xml
==============================================================================
--- forrest/trunk/src/core/forrest.build.xml (original)
+++ forrest/trunk/src/core/forrest.build.xml Tue Sep 7 02:12:04 2004
@@ -258,13 +258,23 @@
<!-- Load properties from user's skinconf.xml, if it is defined -->
<target name="load-project-props" depends="validation-props, prepare-context" if="skinconf.present">
- <xmlproperty file="${skinconf}" collapseattributes="true"/>
+ <xslt in="${skinconf}"
+ out="${project.temp-dir}/no-doctype-project-skinconf.xml"
+ style="${forrest.home/}/context/resources/stylesheets/strip-doctype.xsl"/>
+
+ <xmlproperty file="${project.temp-dir}/no-doctype-project-skinconf.xml"
+ collapseattributes="true"/>
</target>
<!-- Load properties from Forrest's default skinconf.xml, unless a user's is defined -->
<target name="load-forrest-props" unless="skinconf.present">
- <xmlproperty file="${forrest.home}/context/skinconf.xml" collapseattributes="true" />
- <!-- Forrest skinconf should have been previously validated in buld.xml -->
+ <xslt in="${forrest.home}/context/skinconf.xml"
+ out="${project.temp-dir}/no-doctype-forrest-skinconf.xml"
+ style="${forrest.home/}/context/resources/stylesheets/strip-doctype.xsl"/>
+
+ <!-- Forrest skinconf should have been previously validated in build.xml -->
+ <xmlproperty file="${project.temp-dir}/no-doctype-forrest-skinconf.xml"
+ collapseattributes="true"/>
</target>
<!-- Define filters equating to elements in the skinconf.xml file. Skins can