189 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			189 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
<?xml version="1.0" encoding="UTF-8"?>
 | 
						|
<xsl:stylesheet version="1.0"
 | 
						|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 | 
						|
 | 
						|
<xsl:template match="/">
 | 
						|
  <html>
 | 
						|
<head>
 | 
						|
<style>
 | 
						|
body {
 | 
						|
    background-color: lightblue;
 | 
						|
}
 | 
						|
 | 
						|
h1 {
 | 
						|
    color: white;
 | 
						|
    text-align: center;
 | 
						|
    font-size: 30px;
 | 
						|
}
 | 
						|
 | 
						|
td {
 | 
						|
    font-family: verdana;
 | 
						|
    font-size: 14px;
 | 
						|
   padding: 2px;
 | 
						|
}
 | 
						|
th {
 | 
						|
    font-family: verdana;
 | 
						|
    font-size: 14px;
 | 
						|
}
 | 
						|
</style>
 | 
						|
</head>
 | 
						|
 | 
						|
<body>
 | 
						|
<h4><xsl:value-of select="FormatConfig/@Version"/></h4>
 | 
						|
  <xsl:for-each select="//FormatData/*">
 | 
						|
<xsl:apply-templates select="."/>
 | 
						|
 </xsl:for-each>
 | 
						|
 | 
						|
 <xsl:for-each select="//DocStyles">
 | 
						|
<xsl:apply-templates select="."/>
 | 
						|
 </xsl:for-each>
 | 
						|
</body>
 | 
						|
  </html>
 | 
						|
</xsl:template>
 | 
						|
 | 
						|
<xsl:template match="Flags">
 | 
						|
<xsl:if test="*">
 | 
						|
<table border="1">
 | 
						|
    <tr bgcolor="#9acd32">
 | 
						|
      <th>Flag</th>
 | 
						|
      <th>Value</th>
 | 
						|
    </tr>
 | 
						|
<xsl:for-each select="*">
 | 
						|
<tr>
 | 
						|
 <td bgcolor="honeydew"><xsl:value-of select="name()"/></td>
 | 
						|
 <td bgcolor="lemonchiffon" align="right"><xsl:value-of select="."/></td>
 | 
						|
</tr>
 | 
						|
 </xsl:for-each>
 | 
						|
</table>
 | 
						|
<p/>
 | 
						|
</xsl:if>
 | 
						|
</xsl:template>
 | 
						|
 | 
						|
<xsl:template match="CheckOffHeaderList">
 | 
						|
  <table border="1">
 | 
						|
    <tr bgcolor="#9acd32">
 | 
						|
      <th>Check Off Heading</th>
 | 
						|
      <th>Active</th>
 | 
						|
    </tr>
 | 
						|
    <xsl:for-each select="CheckOffHeader">
 | 
						|
      <tr>
 | 
						|
        <td bgcolor="honeydew">
 | 
						|
          <xsl:value-of select="@CheckOffHeading"/>
 | 
						|
        </td>
 | 
						|
        <td bgcolor="lemonchiffon" align="right">
 | 
						|
          <xsl:value-of select="Active"/>
 | 
						|
        </td>
 | 
						|
      </tr>
 | 
						|
    </xsl:for-each>
 | 
						|
  </table>
 | 
						|
  <p/>
 | 
						|
</xsl:template>
 | 
						|
  
 | 
						|
<xsl:template match="CheckOffList">
 | 
						|
<table border="1">
 | 
						|
    <tr bgcolor="#9acd32">
 | 
						|
      <th>Check Off Type</th>
 | 
						|
      <th>Active</th>
 | 
						|
    </tr>
 | 
						|
<xsl:for-each select="CheckOff">
 | 
						|
<tr>
 | 
						|
 <td bgcolor="honeydew"><xsl:value-of select="@MenuItem"/></td>
 | 
						|
 <td bgcolor="lemonchiffon" align="right"><xsl:value-of select="Active"/></td>
 | 
						|
</tr>
 | 
						|
 </xsl:for-each>
 | 
						|
</table>
 | 
						|
<p/>
 | 
						|
</xsl:template>
 | 
						|
 | 
						|
<xsl:template match="CheckOffXOffAdj">
 | 
						|
  <table border="1">
 | 
						|
    <tr bgcolor="#9acd32">
 | 
						|
      <th>Check Off X Offset Adjust (Inches)</th>
 | 
						|
    </tr>
 | 
						|
  
 | 
						|
  <tr>
 | 
						|
    <td bgcolor="lemonchiffon" align="right">
 | 
						|
    <xsl:value-of select="."/>
 | 
						|
  </td>
 | 
						|
</tr>
 | 
						|
  </table>
 | 
						|
  <p/>
 | 
						|
</xsl:template>
 | 
						|
  
 | 
						|
<xsl:template match="ReplaceStrData">
 | 
						|
<table border="1">
 | 
						|
    <tr bgcolor="#9acd32">
 | 
						|
      <th>Replace Word</th>
 | 
						|
      <th>Replace With</th>
 | 
						|
     <th>State</th>
 | 
						|
      <th>Flag</th>
 | 
						|
    </tr>
 | 
						|
<xsl:for-each select="ReplaceStr">
 | 
						|
<tr>
 | 
						|
 <td bgcolor="honeydew"><xsl:value-of select="@ReplaceWord"/></td>
 | 
						|
 <td bgcolor="lemonchiffon" align="right"><xsl:value-of select="@ReplaceWith"/></td>
 | 
						|
 <td bgcolor="lemonchiffon" align="right">
 | 
						|
    <xsl:choose>
 | 
						|
        <xsl:when test="@State = 1">
 | 
						|
            <xsl:text>Add</xsl:text>
 | 
						|
        </xsl:when>
 | 
						|
<xsl:when test="@State = 2">
 | 
						|
            <xsl:text>Modify</xsl:text>
 | 
						|
        </xsl:when>
 | 
						|
        <xsl:otherwise>
 | 
						|
          <xsl:text>Delete</xsl:text>
 | 
						|
        </xsl:otherwise>
 | 
						|
    </xsl:choose></td>
 | 
						|
 <td bgcolor="lemonchiffon" align="right"><xsl:value-of select="@Flag"/></td>
 | 
						|
</tr>
 | 
						|
 </xsl:for-each>
 | 
						|
</table>
 | 
						|
<p/>
 | 
						|
</xsl:template>
 | 
						|
 | 
						|
<xsl:template match="StepData">
 | 
						|
<table border="1">
 | 
						|
    <tr bgcolor="#9acd32">
 | 
						|
      <th>Step Type</th>
 | 
						|
      <th>Font</th>
 | 
						|
    </tr>
 | 
						|
<xsl:for-each select="Step">
 | 
						|
<tr>
 | 
						|
 <td bgcolor="honeydew"><xsl:value-of select="@Type"/></td>
 | 
						|
<style> 
 | 
						|
td {
 | 
						|
  font-family: <xsl:value-of select="FontDesc/@Family"/>;
 | 
						|
}
 | 
						|
</style>
 | 
						|
 <td bgcolor="lemonchiffon" align="right"><xsl:value-of select="FontDesc/@Font"/></td>
 | 
						|
</tr>
 | 
						|
<style> 
 | 
						|
td {
 | 
						|
     font-family: verdana;
 | 
						|
    font-size: 14px;
 | 
						|
   padding: 2px;
 | 
						|
}
 | 
						|
</style>
 | 
						|
 </xsl:for-each>
 | 
						|
</table>
 | 
						|
<p/>
 | 
						|
</xsl:template>
 | 
						|
<xsl:decimal-format name="coerce" NaN=" " />
 | 
						|
<xsl:template match="DocStyles">
 | 
						|
<table border="1">
 | 
						|
    <tr bgcolor="#9acd32">
 | 
						|
      <th>Document Style</th>
 | 
						|
      <th>Page Length</th>
 | 
						|
      <th>Left Margin</th>
 | 
						|
    </tr>
 | 
						|
<xsl:for-each select="DocStyle">
 | 
						|
<tr>
 | 
						|
 <td bgcolor="honeydew"><xsl:value-of select="@Name"/></td>
 | 
						|
 <td bgcolor="lemonchiffon" align="right"><xsl:value-of select="format-number(Layout/@PageLength div 72,'##.00','coerce')"/></td>
 | 
						|
 <td bgcolor="lemonchiffon" align="right"><xsl:value-of select="format-number(Layout/@LeftMargin div 72,'##.00','coerce')"/></td>
 | 
						|
</tr>
 | 
						|
 </xsl:for-each>
 | 
						|
</table>
 | 
						|
</xsl:template>
 | 
						|
 | 
						|
</xsl:stylesheet> |