You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2003/11/03 21:31:21 UTC
cvs commit: cocoon-lenya/src/webapp/lenya usecase.xmap
michi 2003/11/03 12:31:21
Modified: src/webapp/lenya/xslt/authoring/edit oneform.xsl
replace-predifined-entities.xsl
src/webapp/lenya usecase.xmap
Log:
namespace bug and indenting fixed
Revision Changes Path
1.5 +35 -17 cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/oneform.xsl
Index: oneform.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/oneform.xsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- oneform.xsl 30 Oct 2003 00:37:07 -0000 1.4
+++ oneform.xsl 3 Nov 2003 20:31:20 -0000 1.5
@@ -4,6 +4,8 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
+<xsl:output indent="no"/>
+
<xsl:param name="docid"/>
<xsl:param name="cols" select="'80'"/>
<xsl:param name="rows" select="'30'"/>
@@ -54,30 +56,46 @@
<xsl:choose>
<xsl:when test="node()">
-<<xsl:value-of select="name()"/><xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if><xsl:apply-templates select="@*" mode="mixed"/>>
+<xsl:text><</xsl:text><xsl:value-of select="name()"/>
+
+<xsl:apply-templates select="@*" mode="mixed"/>
+
+<xsl:for-each select="namespace::*">
+<xsl:variable name="prefix"><xsl:if test="local-name() != ''">:<xsl:value-of select="local-name()"/></xsl:if></xsl:variable>
+<xsl:if test=". != 'http://www.w3.org/XML/1998/namespace'">
+<xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="."/><xsl:text>"</xsl:text>
+</xsl:if>
+</xsl:for-each>
+
+<xsl:text>></xsl:text>
+
<xsl:apply-templates select="node()" mode="mixed"/>
-</<xsl:value-of select="name()"/>>
+
+<xsl:text></</xsl:text><xsl:value-of select="name()"/><xsl:text>></xsl:text>
+
</xsl:when>
+
+<!-- EMPTY TAG -->
<xsl:otherwise>
-<<xsl:value-of select="name()"/><xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if><xsl:apply-templates select="@*" mode="mixed"/> />
-</xsl:otherwise>
-</xsl:choose>
-<!-- FIXME: <br /> are transformed into <br> by the html serializer -->
-<!--
-<xsl:copy>
-<xsl:copy-of select="@*"/>
-<xsl:apply-templates select="node()" mode="mixed"/>
-</xsl:copy>
--->
-</xsl:template>
+<xsl:text><</xsl:text><xsl:value-of select="name()"/>
+
+<xsl:apply-templates select="@*" mode="mixed"/>
+<xsl:for-each select="namespace::*">
+<xsl:variable name="prefix"><xsl:if test="local-name() != ''">:<xsl:value-of select="local-name()"/></xsl:if></xsl:variable>
+<xsl:if test=". != 'http://www.w3.org/XML/1998/namespace'">
+<xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="."/><xsl:text>"</xsl:text>
+</xsl:if>
+</xsl:for-each>
+
+<xsl:text>/></xsl:text></xsl:otherwise>
+</xsl:choose>
+</xsl:template>
-<xsl:template match="@*" mode="mixed">
-<xsl:variable name="prefix"><xsl:if test="contains(name(),':')">:<xsl:value-of select="substring-before(name(),':')"/></xsl:if></xsl:variable>
-<xsl:text> </xsl:text><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"<xsl:if test="namespace-uri()"><xsl:text> </xsl:text>xmlns<xsl:value-of select="$prefix"/>="<xsl:value-of select="namespace-uri()"/>"</xsl:if></xsl:template>
+<xsl:template match="@*" mode="mixed"><xsl:text> </xsl:text><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</xsl:template>
-</xsl:stylesheet>
+</xsl:stylesheet>
1.2 +1 -0 cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/replace-predifined-entities.xsl
Index: replace-predifined-entities.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/replace-predifined-entities.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- replace-predifined-entities.xsl 14 Oct 2003 13:25:06 -0000 1.1
+++ replace-predifined-entities.xsl 3 Nov 2003 20:31:20 -0000 1.2
@@ -4,6 +4,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
+<xsl:output indent="no"/>
<xsl:template match="text()">
1.134 +7 -3 cocoon-lenya/src/webapp/lenya/usecase.xmap
Index: usecase.xmap
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/usecase.xmap,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- usecase.xmap 29 Oct 2003 17:24:26 -0000 1.133
+++ usecase.xmap 3 Nov 2003 20:31:20 -0000 1.134
@@ -7,7 +7,11 @@
<map:generators default="file"/>
<map:transformers default="xslt"/>
<map:readers default="resource"/>
- <map:serializers default="xhtml"/>
+ <map:serializers default="xhtml">
+ <map:serializer logger="sitemap.serializer.htmlnoi" mime-type="text/html" name="htmlnoi" pool-grow="4" pool-max="32" pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer">
+ <indent>no</indent>
+ </map:serializer>
+ </map:serializers>
<map:matchers default="wildcard"/>
<map:actions>
<map:action name="save" logger="sitemap.action.save" src="org.apache.lenya.cms.cocoon.acting.HTMLFormSaveAction" />
@@ -420,7 +424,7 @@
<map:transform src="xslt/authoring/edit/oneform.xsl">
<map:parameter name="docid" value="{page-envelope:document-path}"/>
</map:transform>
- <map:serialize type="html" />
+ <map:serialize type="htmlnoi" />
</map:match>
</map:match>
@@ -445,7 +449,7 @@
<map:parameter name="language" value="{page-envelope:document-language}"/>
<map:parameter name="event" value="edit"/>
</map:act>
- <map:serialize type="html" />
+ <map:serialize type="htmlnoi" />
</map:match>
</map:match>
</map:match>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org