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/08/08 14:43:07 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/xslt/authoring/edit addSourceTags.xsl numberTags.xsl removeSourceTags.xsl unnumberTags.xsl
michi 2003/08/08 05:43:07
Added: src/webapp/lenya/xslt/authoring/edit addSourceTags.xsl
numberTags.xsl removeSourceTags.xsl
unnumberTags.xsl
Log:
unique numbering and temporary source writing implemented
Revision Changes Path
1.1 cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/addSourceTags.xsl
Index: addSourceTags.xsl
===================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="source"/>
<xsl:template match="/">
<open>
<source:write xmlns:source="http://apache.org/cocoon/source/1.0">
<source:source><xsl:value-of select="$source"/></source:source>
<source:fragment>
<xsl:copy-of select="."/>
</source:fragment>
</source:write>
<content>
<xsl:copy-of select="."/>
</content>
</open>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/numberTags.xsl
Index: numberTags.xsl
===================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" indent="yes" encoding="iso-8859-1"/>
<xsl:template match="/">
<xsl:apply-templates select="*">
<xsl:with-param name="parentID" select="'tag'"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="*|text()|@*">
<xsl:param name="parentID"/>
<xsl:variable name="thisID" select="concat($parentID,'.',position())"/>
<xsl:copy>
<xsl:attribute name="tagID"><xsl:value-of select="$thisID"/></xsl:attribute>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="*|text()|@*">
<xsl:with-param name="parentID" select="$thisID"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/removeSourceTags.xsl
Index: removeSourceTags.xsl
===================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:copy-of select="/open/content/*"/>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-lenya/src/webapp/lenya/xslt/authoring/edit/unnumberTags.xsl
Index: unnumberTags.xsl
===================================================================
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" indent="yes" encoding="iso-8859-1"/>
<xsl:template match="/">
<xsl:apply-templates select="*"/>
</xsl:template>
<!-- FIXME: there is a bug in here!!! (in Xalan?) wenn wir was vor Copy schreiben, funzts, sonst nicht.... -->
<xsl:template match="*|text()">
<xsl:copy>
<xsl:copy-of select="@*[name()!='tagID']"/>
<xsl:apply-templates select="*|text()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org