<?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"/>
    <xsl:param name="xslRootDirectory" select="inr:xslRootDirectory"/>
    <xsl:output method="text" media-type="text/plain" encoding="iso-8859-1"/>
    <!-- List Coordinates Report -->
    <xsl:template match="/">
    	  <xsl:variable name="gridOut" select="inr:SetGridOut(number(InRoads/@outputGridScaleFactor))" />
        <html>

            <body>
                <xsl:choose>
                    <xsl:when test="$xslShowHelp = 'true'">
                        <xsl:call-template name="StyleSheetHelp"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:for-each select="InRoads">

                            <!-- Project Data -->
                            <xsl:for-each select="GeometryProject">
                                <table class="margin" cellpadding="2" width="90%">

                                </table>
                                <hr />
                                <!-- Horizontal Alignment Data -->
                                <xsl:for-each select="HorizontalAlignment">
                                    <table cellpadding="4">
                                        <tbody>

                                        </tbody>
                                    </table>
                                    <table class="margin" cellpadding="2" cellspacing="5" width="90%">

                                        <tbody>
                                            <xsl:for-each select="HorizontalElements">
                                                <xsl:apply-templates/>
                                            </xsl:for-each>
                                        </tbody>
                                    </table>
                                </xsl:for-each>
                                <!-- Cogo Point Data -->
                                <xsl:for-each select="CogoPoints">

                                    <table class="margin" cellpadding="2" cellspacing="5" width="90%"> 

                                        <tbody>
                                            <xsl:for-each select="GeometryPoint">
                                                <tr>
                                                    <td align="center"><xsl:value-of select="@name"/></td><xsl:text>,</xsl:text>
                                                    <td align="right"><xsl:value-of select="inr:northingFormat(number(@northing), $xslNorthingPrecision)"/></td><xsl:text>,</xsl:text>
                                                    <td align="right"><xsl:value-of select="inr:eastingFormat(number(@easting), $xslEastingPrecision)"/></td><xsl:text>,</xsl:text>
                                                    <td align="right"><xsl:value-of select="inr:elevationFormat(number(@elevation), $xslElevationPrecision)"/></td><xsl:text>,</xsl:text>
                                                    <td align="center"><xsl:value-of select="@style"/></td><xsl:text>&#xd;</xsl:text>
                                                </tr>
                                            </xsl:for-each>
                                        </tbody>
                                    </table>
                                </xsl:for-each>
                            </xsl:for-each>
                        </xsl:for-each>
                    </xsl:otherwise>
                </xsl:choose>
            </body>
        </html>
    </xsl:template>
    <!-- Element Point Data -->
    <xsl:template match="Start | PI | Center | End[@pointType='POE']">
        <tr>
            <td align="center"><xsl:value-of select="@name"/></td>
            <td align="center"><xsl:value-of select="@type"/></td>
            <td align="right"><xsl:value-of select="inr:northingFormat(number(@northing), $xslNorthingPrecision)"/></td>
            <td align="right"><xsl:value-of select="inr:eastingFormat(number(@easting), $xslEastingPrecision)"/></td>
            <td align="right"><xsl:value-of select="inr:elevationFormat(number(@elevation), $xslElevationPrecision)"/></td>
            <td align="center"><xsl:value-of select="@style"/></td>
        </tr>
    </xsl:template>
    <xsl:template name="StyleSheetHelp">
        <div class="section1">
            <h4 lang="en">Notes</h4>
            <p class="normal1" lang="en">
                You must include at least one horizontal alignment and/or one Cogo point in the <em>Include
                </em> fields on the <em>Tools &gt; XML Reports &gt; Geometry</em> command to get results 
                from this report.
            </p>
            <p class="normal1">
                Better results are obtained if your alignment points have names.
            </p>
            <p class="small" lang="en">
                <em>&#xa9; 2006 Bentley Systems, Inc</em>
            </p>
        </div>
    </xsl:template>
</xsl:stylesheet>

