You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/09/07 15:05:52 UTC
svn commit: r279317 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates:
content-main.ft content-title.ft
Author: rgardler
Date: Wed Sep 7 06:05:36 2005
New Revision: 279317
URL: http://svn.apache.org/viewcvs?rev=279317&view=rev
Log:
add namespace to templates (it was 'pretending' to work last before, must have been a copy-over)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft?rev=279317&r1=279316&r2=279317&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft Wed Sep 7 06:05:36 2005
@@ -18,6 +18,7 @@
<forrest:contract
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
name="content-main" type="nugget">
<description>
content-main - Template will output the main body of a document.
@@ -30,9 +31,7 @@
<xsl:comment>+
|start content-main
+</xsl:comment>
- <!-- FIXME: remove the following "debug" line -->
- <h1>This comes from the content-main contract</h1>
- <xsl:copy-of select="body/*"/>
+ <xsl:copy-of select="xhtml2:body/*"/>
<xsl:comment>+
|end content-main
+</xsl:comment>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft?rev=279317&r1=279316&r2=279317&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft Wed Sep 7 06:05:36 2005
@@ -18,9 +18,11 @@
<forrest:contract
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
name="content-title" type="nugget">
<description>
content-title - Template will output the title (first h1 of the content).
+ FIXME: in XHTML2 the title may be the heading of the first section
</description>
<usage><![CDATA[<forrest:contract name="content-title"/>]]></usage>
<forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
@@ -30,7 +32,8 @@
<xsl:comment>+
|start content-title
+</xsl:comment>
- <xsl:copy-of select="div[@id='content']/h1[position()=1]"/>
+ <!-- FIXME: this doesn't work yet (namespace issue?)-->
+ <xsl:copy-of select="xhtml2:div[@id='content']/xhtml2:h1[position()=1]"/>
<xsl:comment>+
|end content-title
+</xsl:comment>
Re: XHTML2 namespace
Posted by David Crossley <cr...@apache.org>.
Gregor J. Rothfuss wrote:
> Tim Williams wrote:
> >I am not completely sure that it matters, but I felt like some of my
> >issues yesterday with the stylesheet might have been namespace related
> >(i.e. the source doc had a trailing "slash" and the stylesheet did
> >not). The standard seems to indicate with a trailing slash, I suspect
> >most tools would be forgiving on this anyway and I'm not sure that it
> >really matters but it seems we should pick one and run with it.
>
> it does matter. tools are not at liberty to ignore trailing slashes.
Both xmllint and Jing complain about the trailing slash.
http://www.w3.org/TR/xhtml2/xhtml20_relax.html
does not use a trailing slash.
Yet the examples do use a trailing slash at
http://www.w3.org/TR/xhtml2/conformance.html
Confused.
-David
Re: XHTML2 namespace [was: Re: svn commit: r279317 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates:
content-main.ft content-title.ft
Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Tim Williams wrote:
> I am not completely sure that it matters, but I felt like some of my
> issues yesterday with the stylesheet might have been namespace related
> (i.e. the source doc had a trailing "slash" and the stylesheet did
> not). The standard seems to indicate with a trailing slash, I suspect
> most tools would be forgiving on this anyway and I'm not sure that it
> really matters but it seems we should pick one and run with it.
it does matter. tools are not at liberty to ignore trailing slashes.
XHTML2 namespace [was: Re: svn commit: r279317 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates: content-main.ft content-title.ft
Posted by Tim Williams <wi...@gmail.com>.
I am not completely sure that it matters, but I felt like some of my
issues yesterday with the stylesheet might have been namespace related
(i.e. the source doc had a trailing "slash" and the stylesheet did
not). The standard seems to indicate with a trailing slash, I suspect
most tools would be forgiving on this anyway and I'm not sure that it
really matters but it seems we should pick one and run with it.
--tim
On 9/7/05, rgardler@apache.org <rg...@apache.org> wrote:
> Author: rgardler
> Date: Wed Sep 7 06:05:36 2005
> New Revision: 279317
>
> URL: http://svn.apache.org/viewcvs?rev=279317&view=rev
> Log:
> add namespace to templates (it was 'pretending' to work last before, must have been a copy-over)
>
> Modified:
> forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft
> forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft
>
> Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft
> URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft?rev=279317&r1=279316&r2=279317&view=diff
> ==============================================================================
> --- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft (original)
> +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-main.ft Wed Sep 7 06:05:36 2005
> @@ -18,6 +18,7 @@
> <forrest:contract
> xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
> xmlns:forrest="http://apache.org/forrest/templates/1.0"
> + xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
> name="content-main" type="nugget">
> <description>
> content-main - Template will output the main body of a document.
> @@ -30,9 +31,7 @@
> <xsl:comment>+
> |start content-main
> +</xsl:comment>
> - <!-- FIXME: remove the following "debug" line -->
> - <h1>This comes from the content-main contract</h1>
> - <xsl:copy-of select="body/*"/>
> + <xsl:copy-of select="xhtml2:body/*"/>
> <xsl:comment>+
> |end content-main
> +</xsl:comment>
>
> Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft
> URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft?rev=279317&r1=279316&r2=279317&view=diff
> ==============================================================================
> --- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft (original)
> +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/templates/content-title.ft Wed Sep 7 06:05:36 2005
> @@ -18,9 +18,11 @@
> <forrest:contract
> xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
> xmlns:forrest="http://apache.org/forrest/templates/1.0"
> + xmlns:xhtml2="http://www.w3.org/2002/06/xhtml2"
> name="content-title" type="nugget">
> <description>
> content-title - Template will output the title (first h1 of the content).
> + FIXME: in XHTML2 the title may be the heading of the first section
> </description>
> <usage><![CDATA[<forrest:contract name="content-title"/>]]></usage>
> <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
> @@ -30,7 +32,8 @@
> <xsl:comment>+
> |start content-title
> +</xsl:comment>
> - <xsl:copy-of select="div[@id='content']/h1[position()=1]"/>
> + <!-- FIXME: this doesn't work yet (namespace issue?)-->
> + <xsl:copy-of select="xhtml2:div[@id='content']/xhtml2:h1[position()=1]"/>
> <xsl:comment>+
> |end content-title
> +</xsl:comment>
>
>
>