Subject: [xsl] What effect does DOCTYPE have From: "Rick Quatro" <frameexpert@xxxxxxxxxxxx> Date: Tue, 31 Jan 2006 08:03:01 -0500 |
<?Fm Condition Comment Red NO_OVERRIDE show?> <?Fm Condition Prolog PANTONE%20648-50%20CVP NO_OVERRIDE hide?> <?Fm Condition Internal Black DOUBLE_UNDERLINE show?> <reference id = "SampleTitle" audience = "Publishing Smarter Reviewers Only" rev = "Draft" outputclass = "Chapter" xmlns:ditaarch = "http://dita.oasis-open.org/architecture/2005/"> <title>Sample Title</title> <?Fm Condstart Prolog?> <prolog> <author>Bernard</author> </prolog> <?Fm Condend Prolog?> <refbody> <section> <p>This is a sample.</p> <?Fm Condstart Comment?> <draft-comment author = "Bernard" importance = "normal"> <p>Some comment here</p> </draft-comment> <?Fm Condend Comment?> </section> </refbody> </reference>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="find" select="hide"/> <xsl:variable name="replace" select="show"/>
<xsl:template name="do-replace"> <xsl:param name="text"/> <xsl:choose> <xsl:when test="contains($text, $find)"> <xsl:value-of select="substring-before($text, $find)"/> <xsl:value-of select="$replace"/> <xsl:call-template name="do-replace"> <xsl:with-param name="text" select="substring-after($text, $find)"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$text"/> </xsl:otherwise> </xsl:choose> </xsl:template>
<xsl:template match="*"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template>
<xsl:template match="processing-instruction('Fm')"> <xsl:processing-instruction name="Fm"> <xsl:call-template name="do-replace"> <xsl:with-param name="text" select="."/> </xsl:call-template> </xsl:processing-instruction> </xsl:template>
<xsl:template match="processing-instruction()"> <xsl:copy/> </xsl:template>
Rick Quatro Carmen Publishing 585-659-8267 www.frameexpert.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Mouse Events in XSL, Dan Powderhill | Thread | RE: [xsl] What effect does DOCTYPE , Michael Kay |
Re: [xsl] Find and change an attrib, Florent Georges | Date | RE: [xsl] What effect does DOCTYPE , Michael Kay |
Month |