Skip to content

Instantly share code, notes, and snippets.

@NYCJacob
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NYCJacob/473b6dccd83f464e512c to your computer and use it in GitHub Desktop.
Save NYCJacob/473b6dccd83f464e512c to your computer and use it in GitHub Desktop.
xsltParagraphSelector
<root>
<row0>
<firstName>Yoko</firstName>
<lastName>Ono</lastName>
</row0>
<row1>
<firstName>John</firstName>
<lastName>Lennon</lastName>
</row1>
<row2>
<UD001ReliefSupp>1</UD001addReliefSupp>
<UD001sepAgreement>1</UD001sepAgreement>
</row2>
</root>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:choose>
<xsl:when test="root/row2/UD001ReliefSupp[text() = '1'] ">
<text:p text:style-name="P31">
<text:span text:style-name="T14">XX THIS IS IN PLACE OF A CHECKBOX</text:span>
<text:span text:style-name="T3"><text:s/>TEXT IF VALUE ONE SET BY CHECKBOX ON FORM
</text:span>
<text:span text:style-name="T3"></text:span>
</text:p>
</xsl:when>
<xsl:otherwise>
<text:p text:style-name="P31">
<text:span text:style-name="T3">DEFAULT TEXT HERE
</text:span>
<text:span text:style-name="T20">;</text:span>
<text:span text:style-name="T3"></text:span>
</text:p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment