Differences between revisions 2 and 3
Revision 2 as of 2006-08-18 10:02:19
Size: 1326
Editor: drseuk
Comment: Still learning ;-)
Revision 3 as of 2009-09-20 23:27:16
Size: 1326
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Sample image2xhtml.xsl file for a custom "image" doctype

Note this will also allow you to edit the lenya meta data as lenya:meta is a child element of image. If you don't want the meta data to be editable with BXE, you'd have to wrap a new element around your non-meta data elements and change the bxe_path to select that instead.

<?xml version="1.0" encoding="UTF-8" ?>

<xsl:stylesheet version="1.0"

<xsl:param name="rendertype" select=""/> <xsl:param name="nodeid"/>

<xsl:template match="/image:image">

  • <xsl:choose> <xsl:when test="$rendertype = 'edit'">

    • <div id="body">

      • <xsl:attribute name="bxe_xpath">/image:image</xsl:attribute> <xsl:copy-of select="." />

      </div>

    </xsl:when> <xsl:otherwise>

    • <div id="body">

      • <h1><xsl:value-of select="image:title" /></h1> <p><xsl:value-of select="image:description" /></p> <p><xsl:value-of select="image:attribution" /></p>

      </div>

    </xsl:otherwise> </xsl:choose>

</xsl:template>

HowToEditCustomDoctypesWithBXESampleXSLFile (last edited 2009-09-20 23:27:16 by localhost)