I am trying to get the extendedDescription field with parentheses around it inline with Description, except when there is no extendedDescription.
I have found a lot of answers on formatting outputs and if statements. But, I am not a programmer and have not been able to get anything to work the way I would like it to.
If anybody could help me out I would appreciate it. Thank you!
Here is the code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:inr="http://mycompany.com/mynamespace">
<xsl:include href="../format.xsl"/>
<!-- TDS CR5 Format -->
<xsl:output method="text" media-type="text/plain" encoding="iso-8859-1"/>
<xsl:template match="/">
<xsl:variable name="gridOut" select="inr:SetGridOut(number(InRoads/@outputGridScaleFactor))" />
<xsl:choose>
<xsl:when test="$xslShowHelp = 'true'">
<xsl:call-template name="StyleSheetHelp"/>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="//GeometryPoint[@name]">
<xsl:text/>
<xsl:value-of select="@name"/><xsl:text>,</xsl:text>
<xsl:value-of select="inr:northingFormat(number(@northing), $xslNorthingPrecision)"/><xsl:text>,</xsl:text>
<xsl:value-of select="inr:eastingFormat(number(@easting), $xslEastingPrecision)"/><xsl:text>,</xsl:text>
<xsl:value-of select="inr:elevationFormat(number(@elevation), $xslElevationPrecision)"/><xsl:text>,</xsl:text>
<xsl:value-of select="@description"/>(<xsl:value-of select="@extendedDescription"/>)<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="StyleSheetHelp">
<xsl:text>Notes

</xsl:text>
<xsl:text> You must include at least one cogo point in the Cogo
</xsl:text>
<xsl:text> Points > Include field or one horizontal alignment with
</xsl:text>
<xsl:text> named points in the Horizontal Alignments > Include
</xsl:text>
<xsl:text> field on the Tools > XML Reports > Geometry command to
</xsl:text>
<xsl:text> get results from this report.

</xsl:text>
<xsl:text> Most style sheets in the DataCollection directory do
</xsl:text>
<xsl:text> not honor Tools > Format Options with the exception of
</xsl:text>
<xsl:text> precision, where practical.

</xsl:text>
<xsl:text>Copyright 2006 Bentley Systems, Inc
</xsl:text>
</xsl:template>
</xsl:stylesheet>
The output here is good, except when there is no extendedDescription, because I get () in the the resulting file.
Example output(present):
CS300,848822.7010,617517.7670,1022.26,6615(SES#44)
CSG002,859658.2240,607167.2050,998.76,6652()
Example output(wanted):
CS300,848822.7010,617517.7670,1022.26,6615(SES#44)
CSG002,859658.2240,607167.2050,998.76,6652
Again Thank you to anyone that can help me out.