You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2003/10/06 18:11:17 UTC
cvs commit: cocoon-lenya/src/templates/forrest/xslt/authoring bxeng-change-object-path.xsl bxeng-meta.xsl bxeng-change-object-path-back.xsl
andreas 2003/10/06 09:11:17
Added: src/templates/forrest/xslt remove-xhtml-ns.xsl
src/templates/forrest/xslt/authoring
bxeng-change-object-path.xsl bxeng-meta.xsl
bxeng-change-object-path-back.xsl
Log:
starting BXENG implementation
Revision Changes Path
1.1 cocoon-lenya/src/templates/forrest/xslt/remove-xhtml-ns.xsl
Index: remove-xhtml-ns.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="xhtml"
>
<xsl:template match="@*|node()">
<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-lenya/src/templates/forrest/xslt/authoring/bxeng-change-object-path.xsl
Index: bxeng-change-object-path.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" version="1.0">
<xsl:param name="documentid" />
<xsl:variable name="nodeid">
<xsl:call-template name="getnodeid">
<xsl:with-param name="url" select="$documentid" />
</xsl:call-template>
</xsl:variable>
<xsl:template match="lenya:object/@data">
<xsl:attribute name="data">
<xsl:value-of select="concat($nodeid, '/', .)" />
</xsl:attribute>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template name="getnodeid">
<xsl:param name="url" />
<xsl:param name="prefix">.xml</xsl:param>
<xsl:param name="langprefix">_</xsl:param>
<xsl:param name="slash">/</xsl:param>
<xsl:choose>
<xsl:when test="contains($url, $slash)">
<xsl:call-template name="getnodeid">
<xsl:with-param name="url" select="substring-after($url, $slash)" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="$url" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-lenya/src/templates/forrest/xslt/authoring/bxeng-meta.xsl
Index: bxeng-meta.xsl
===================================================================
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xslout="Can be anything, doesn't matter">
<xsl:output method="xml"/>
<xsl:namespace-alias stylesheet-prefix="xslout" result-prefix="xsl"/>
<!-- Copies everything else to the result tree -->
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[@bxe-editable='body']">
<!--
<xslout:apply-templates select="/xhtml:html/lenya:meta/dc:title"/>
-->
<xslout:apply-templates select="/xhtml:html/xhtml:body"/>
</xsl:template>
<!-- Adds the stylesheet specific elements -->
<xsl:template match="/">
<xslout:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xslout:output method="xml"/>
<xslout:template match="/">
<xsl:apply-templates/>
</xslout:template>
<xslout:template match="*">
<xslout:copy-of select="."/>
</xslout:template>
</xslout:stylesheet>
</xsl:template>
</xsl:stylesheet>
1.1 cocoon-lenya/src/templates/forrest/xslt/authoring/bxeng-change-object-path-back.xsl
Index: bxeng-change-object-path-back.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" version="1.0">
<xsl:template match="lenya:object/@data">
<xsl:variable name="url">
<xsl:value-of select="." />
</xsl:variable>
<xsl:attribute name="data">
<xsl:value-of select="substring-after($url, '/')" />
</xsl:attribute>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</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