home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 June / PCpro_2006_06.ISO / files / techtalk / odfreader-0.1.1-fx.xpi / chrome / chromeFiles / content / vnd.oasis.opendocument.text.xsl < prev   
Encoding:
Extensible Markup Language  |  2006-01-16  |  17.0 KB  |  528 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.     This stylesheet converts OpenDocument text files to XHTML.
  4.     Copyright (C) 2005-2006 J. David Eisenberg
  5.  
  6.     This library is free software; you can redistribute it and/or
  7.     modify it under the terms of the GNU Lesser General Public
  8.     License as published by the Free Software Foundation; either
  9.     version 2.1 of the License, or (at your option) any later version.
  10.  
  11.     This library is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.     Lesser General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU Lesser General Public
  17.     License along with this library; if not, write to the Free Software
  18.     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  19.     
  20.     Author: J. David Eisenberg
  21.     Contact: catcode@catcode.com
  22. -->
  23. <xsl:stylesheet version="1.0"
  24.     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  25.     xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
  26.     xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
  27.     xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
  28.     xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
  29.     xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
  30.     xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
  31.     xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
  32.     xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
  33.     xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
  34.     xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
  35.     xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
  36.     xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
  37.     xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
  38.     xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
  39.  
  40.     xmlns:dc="http://purl.org/dc/elements/1.1/"
  41.     xmlns:xlink="http://www.w3.org/1999/xlink"
  42.     xmlns:math="http://www.w3.org/1998/Math/MathML"
  43.     xmlns:xforms="http://www.w3.org/2002/xforms"
  44.  
  45.     xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
  46.     xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
  47.     xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
  48.     
  49.     xmlns:ooo="http://openoffice.org/2004/office"
  50.     xmlns:ooow="http://openoffice.org/2004/writer"
  51.     xmlns:oooc="http://openoffice.org/2004/calc"
  52.     xmlns:int="http://catcode.com/odf_to_xhtml/internal"
  53.  
  54.     exclude-result-prefixes="office meta config text table draw presentation
  55.         dr3d chart form script style number anim dc xlink math xforms fo
  56.         svg smil ooo ooow oooc int"
  57. >
  58.  
  59. <xsl:output
  60.     method="xml"
  61.     indent="yes"
  62.     omit-xml-declaration="yes"
  63.     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
  64.     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  65.     encoding="UTF-8"
  66. />
  67. <xsl:variable name="lineBreak"><xsl:text>
  68. </xsl:text></xsl:variable>
  69.  
  70. <xsl:key name="listTypes" match="text:list-style" use="@style:name"/>
  71.  
  72. <xsl:template match="/office:document-content">
  73. <html xmlns="http://www.w3.org/1999/xhtml">
  74. <head>
  75. <title>Converted by odt_to_xhtml.xsl</title>
  76. <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  77. <xsl:apply-templates select="office:automatic-styles"/>
  78. </head>
  79. <body>
  80. <xsl:apply-templates select="office:body/office:text"/>
  81. </body>
  82. </html>
  83. </xsl:template>
  84.  
  85. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  86. <!--
  87.     This section of the transformation handles styles in the
  88.     content.xml file
  89. -->
  90. <xsl:template match="office:automatic-styles">
  91.     <style type="text/css">
  92.     <xsl:apply-templates/>
  93.     </style>
  94. </xsl:template>
  95.  
  96. <xsl:template match="style:style">
  97.     <xsl:choose>
  98.         <xsl:when test="@style:family='table'">
  99.             <xsl:call-template name="process-table-style"/>
  100.         </xsl:when>
  101.         <xsl:when test="@style:family='table-column'">
  102.             <xsl:call-template name="process-table-column-style"/>
  103.         </xsl:when>
  104.         <xsl:when test="@style:family='table-cell'">
  105.             <xsl:call-template name="process-table-cell-style"/>
  106.         </xsl:when>
  107.         <xsl:when test="@style:family='paragraph'">
  108.             <xsl:call-template name="process-paragraph-style"/>
  109.         </xsl:when>
  110.         <xsl:when test="@style:family='text'">
  111.             <xsl:call-template name="process-text-style"/>
  112.         </xsl:when>
  113.     </xsl:choose>
  114. </xsl:template>
  115.  
  116. <xsl:template name="process-table-style">
  117.     <xsl:if test="style:table-properties">
  118.         <xsl:value-of select="$lineBreak"/>
  119.         <xsl:text>.</xsl:text>
  120.         <xsl:value-of select="translate(@style:name,'.','_')"/>
  121.         <xsl:text>{width: </xsl:text>
  122.         <xsl:value-of select="style:table-properties/
  123.             @style:width"/>
  124.         <xsl:text>}</xsl:text>
  125.         <xsl:value-of select="$lineBreak"/>
  126.     </xsl:if>
  127. </xsl:template>
  128.  
  129. <xsl:template name="process-table-column-style">
  130.     <xsl:if test="style:table-column-properties">
  131.         <xsl:value-of select="$lineBreak"/>
  132.         <xsl:text>.</xsl:text>
  133.         <xsl:value-of select="translate(@style:name,'.','_')"/>
  134.         <xsl:text>{width: </xsl:text>
  135.         <xsl:value-of select="style:table-column-properties/
  136.             @style:column-width"/><xsl:text>;</xsl:text>
  137.         <xsl:value-of select="$lineBreak"/>
  138.                 <xsl:call-template name="handle-style-properties">
  139.             <xsl:with-param name="nodeSet"
  140.                 select="style:table-properties"/>
  141.         </xsl:call-template>
  142.         <xsl:text>}</xsl:text>
  143.         <xsl:value-of select="$lineBreak"/>
  144.     </xsl:if>
  145. </xsl:template>
  146.  
  147. <xsl:template name="process-table-cell-style">
  148.     <xsl:if test="style:table-cell-properties">
  149.         <xsl:value-of select="$lineBreak"/>
  150.         <xsl:text>.</xsl:text>
  151.         <xsl:value-of select="translate(@style:name,'.','_')"/>
  152.         <xsl:text>{</xsl:text><xsl:value-of select="$lineBreak"/>
  153.         <xsl:call-template name="handle-style-properties">
  154.             <xsl:with-param name="nodeSet"
  155.                 select="style:table-cell-properties"/>
  156.         </xsl:call-template>
  157.         <xsl:text>}</xsl:text><xsl:value-of select="$lineBreak"/>
  158.     </xsl:if>
  159. </xsl:template>
  160.  
  161. <xsl:template name="process-paragraph-style">
  162.     <xsl:if test="style:paragraph-properties">
  163.         <xsl:value-of select="$lineBreak"/>
  164.         <xsl:text>.</xsl:text>
  165.         <xsl:value-of select="translate(@style:name,'.','_')"/>
  166.         <xsl:text>{</xsl:text><xsl:value-of select="$lineBreak"/>
  167.         <xsl:call-template name="handle-style-properties">
  168.             <xsl:with-param name="nodeSet"
  169.                 select="style:paragraph-properties"/>
  170.         </xsl:call-template>
  171.         <xsl:text>}</xsl:text><xsl:value-of select="$lineBreak"/>
  172.     </xsl:if>
  173. </xsl:template>
  174.  
  175. <xsl:template name="process-text-style">
  176.     <xsl:if test="style:text-properties">
  177.         <xsl:value-of select="$lineBreak"/>
  178.         <xsl:text>.</xsl:text>
  179.         <xsl:value-of select="translate(@style:name,'.','_')"/>
  180.         <xsl:text>{</xsl:text><xsl:value-of select="$lineBreak"/>
  181.         <xsl:call-template name="handle-style-properties">
  182.             <xsl:with-param name="nodeSet"
  183.                 select="style:text-properties"/>
  184.         </xsl:call-template>
  185.         <xsl:text>}</xsl:text><xsl:value-of select="$lineBreak"/>
  186.     </xsl:if>
  187. </xsl:template>
  188.  
  189. <xsl:template name="handle-style-properties">
  190.     <xsl:param name="nodeSet"/>
  191.     <xsl:for-each select="$nodeSet/@*">
  192.         <xsl:variable name="this" select="."/>
  193.         <xsl:variable name="find" select="document('')/xsl:stylesheet/
  194.             int:attr-map/int:attr[@name=name($this)]"/>
  195.         <xsl:if test="$find">
  196.             <xsl:variable name="action" select="$find/@action"/>
  197.             <xsl:choose>
  198.                 <xsl:when test="$action='pass-through'">
  199.                     <xsl:call-template name="pass-through"/>
  200.                 </xsl:when>
  201.                 <xsl:when test="$action='check-align'">
  202.                     <xsl:call-template name="check-align"/>
  203.                 </xsl:when>
  204.             </xsl:choose>
  205.         </xsl:if>
  206.     </xsl:for-each>
  207. </xsl:template>
  208.  
  209. <xsl:template name="pass-through">
  210.     <xsl:value-of select="local-name()"/><xsl:text>: </xsl:text>
  211.     <xsl:value-of select="."/><xsl:text>;</xsl:text>
  212.     <xsl:value-of select="$lineBreak"/>
  213. </xsl:template>
  214.  
  215. <xsl:template name="check-align">
  216.     <xsl:value-of select="local-name()"/><xsl:text>: </xsl:text>
  217.     <xsl:choose>
  218.         <xsl:when test=".='start'"><xsl:text>left</xsl:text></xsl:when>
  219.         <xsl:when test=".='end'"><xsl:text>right</xsl:text></xsl:when>
  220.         <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
  221.     </xsl:choose>
  222.     <xsl:text>;</xsl:text>
  223.     <xsl:value-of select="$lineBreak"/>
  224. </xsl:template>
  225.  
  226. <xsl:template match="text:list-level-style-bullet">
  227.     <xsl:text>.</xsl:text>
  228.     <xsl:value-of select="../@style:name"/>
  229.     <xsl:text>_</xsl:text>
  230.     <xsl:value-of select="@text:level"/>
  231.     <xsl:text>{ list-style-type: </xsl:text>
  232.     <xsl:choose>
  233.         <xsl:when test="@text:level mod 3 = 1">disc</xsl:when>
  234.         <xsl:when test="@text:level mod 3 = 2">circle</xsl:when>
  235.         <xsl:when test="@text:level mod 3 = 0">square</xsl:when>
  236.         <xsl:otherwise>decimal</xsl:otherwise>
  237.     </xsl:choose>
  238.     <xsl:text>;}</xsl:text>
  239.     <xsl:value-of select="$lineBreak"/>
  240. </xsl:template>
  241.  
  242.  
  243. <xsl:template match="text:list-level-style-number">
  244.     <xsl:text>.</xsl:text>
  245.     <xsl:value-of select="../@style:name"/>
  246.     <xsl:text>_</xsl:text>
  247.     <xsl:value-of select="@text:level"/>
  248.     <xsl:text>{ list-style-type: </xsl:text>
  249.     <xsl:choose>
  250.         <xsl:when test="@style:num-format='1'">decimal</xsl:when>
  251.         <xsl:when test="@style:num-format='I'">upper-roman</xsl:when>
  252.         <xsl:when test="@style:num-format='i'">lower-roman</xsl:when>
  253.         <xsl:when test="@style:num-format='A'">upper-alpha</xsl:when>
  254.         <xsl:when test="@style:num-format='a'">lower-alpha</xsl:when>
  255.         <xsl:otherwise>decimal</xsl:otherwise>
  256.     </xsl:choose>
  257.     <xsl:text>;}</xsl:text>
  258.     <xsl:value-of select="$lineBreak"/>
  259. </xsl:template>
  260. <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  261. <!--
  262.     This section of the transformation handles the true content
  263.     elements in the content.xml file
  264. -->
  265.  
  266. <!--
  267.     Yes, paragraphs in ODT really produce a <div> in XHTML,
  268.     because an ODT paragraph has no extra line spacing.
  269. -->
  270. <xsl:template match="text:p">
  271.     <div class="{translate(@text:style-name,'.','_')}">
  272.         <xsl:apply-templates/>
  273.         <xsl:if test="count(node())=0"><br /></xsl:if>
  274.     </div>
  275. </xsl:template>
  276.  
  277. <xsl:template match="text:span">
  278.     <span class="{translate(@text:style-name,'.','_')}">
  279.         <xsl:apply-templates/>
  280.     </span>
  281. </xsl:template>
  282.  
  283. <xsl:template match="text:h">
  284.     <!-- Heading levels go only to 6 in XHTML -->
  285.     <xsl:variable name="level">
  286.         <xsl:choose>
  287.             <xsl:when test="@text:outline-level > 6">6</xsl:when>
  288.             <xsl:otherwise>
  289.                 <xsl:value-of select="@text:outline-level"/>
  290.             </xsl:otherwise>
  291.         </xsl:choose>
  292.     </xsl:variable>
  293.     <xsl:element name="{concat('h', $level)}">
  294.         <xsl:attribute name="class">
  295.             <xsl:value-of
  296.             select="translate(@text:style-name,'.','_')"/>
  297.         </xsl:attribute>
  298.         <xsl:apply-templates/>
  299.     </xsl:element>
  300. </xsl:template>
  301.  
  302. <!--
  303.     When processing a list, you have to look at the parent style
  304.     *and* level of nesting
  305. -->
  306. <xsl:template match="text:list">
  307.     <xsl:variable name="level" select="count(ancestor::text:list)+1"/>
  308.     
  309.     <!-- the list class is the @text:style-name of the outermost
  310.         <text:list> element -->
  311.     <xsl:variable name="listClass">
  312.         <xsl:choose>
  313.             <xsl:when test="$level=1">
  314.                 <xsl:value-of select="@text:style-name"/>
  315.             </xsl:when>
  316.             <xsl:otherwise>
  317.                 <xsl:value-of select="
  318.                     ancestor::text:list[last()]/@text:style-name"/>
  319.             </xsl:otherwise>
  320.         </xsl:choose>
  321.     </xsl:variable>
  322.     
  323.     <!-- Now select the <text:list-level-style-foo> element at this
  324.         level of nesting for this list -->
  325.     <xsl:variable name="node" select="key('listTypes',
  326.         $listClass)/*[@text:level='$level']"/>
  327.  
  328.     <!-- emit appropriate list type -->
  329.     <xsl:choose>
  330.         <xsl:when test="local-name($node)='list-level-style-number'">
  331.             <ol class="{concat($listClass,'_',$level)}">
  332.                 <xsl:apply-templates/>
  333.             </ol>
  334.         </xsl:when>
  335.         <xsl:otherwise>
  336.             <ul class="{concat($listClass,'_',$level)}">
  337.                 <xsl:apply-templates/>
  338.             </ul>
  339.         </xsl:otherwise>
  340.     </xsl:choose>
  341. </xsl:template>
  342.  
  343. <xsl:template match="text:list-item">
  344.     <li><xsl:apply-templates/></li>
  345. </xsl:template>
  346.  
  347. <xsl:template match="table:table">
  348.     <table class="{@table:style-name}">
  349.         <colgroup>
  350.             <xsl:apply-templates select="table:table-column"/>
  351.         </colgroup>
  352.         <xsl:if test="table:table-header-rows/table:table-row">
  353.             <thead>
  354.             <xsl:apply-templates
  355.                 select="table:table-header-rows/table:table-row"/>
  356.                 </thead>
  357.         </xsl:if>
  358.         <tbody>
  359.         <xsl:apply-templates select="table:table-row"/>
  360.         </tbody>
  361.     </table>
  362. </xsl:template>
  363.  
  364. <xsl:template match="table:table-column">
  365. <col>
  366.     <xsl:if test="@table:number-columns-repeated">
  367.         <xsl:attribute name="span">
  368.             <xsl:value-of select="@table:number-columns-repeated"/>
  369.         </xsl:attribute>
  370.     </xsl:if>
  371.     <xsl:if test="@table:style-name">
  372.         <xsl:attribute name="class">
  373.             <xsl:value-of select="translate(@table:style-name,'.','_')"/>
  374.         </xsl:attribute>
  375.     </xsl:if>
  376. </col>
  377. </xsl:template>
  378.  
  379. <xsl:template match="table:table-row">
  380. <tr>
  381.     <xsl:apply-templates select="table:table-cell"/>
  382. </tr>
  383. </xsl:template>
  384.  
  385. <xsl:template match="table:table-cell">
  386.     <xsl:variable name="n">
  387.         <xsl:choose>
  388.             <xsl:when test="@table:number-columns-repeated != 0">
  389.                 <xsl:value-of select="@table:number-columns-repeated"/>
  390.             </xsl:when>
  391.             <xsl:otherwise>1</xsl:otherwise>
  392.         </xsl:choose>
  393.     </xsl:variable>
  394.     <xsl:call-template name="process-table-cell">
  395.         <xsl:with-param name="n" select="$n"/>
  396.     </xsl:call-template>
  397. </xsl:template>
  398.  
  399. <xsl:template name="process-table-cell">
  400.     <xsl:param name="n"/>
  401.     <xsl:if test="$n != 0">
  402.         <td>
  403.         <xsl:if test="@table:style-name">
  404.             <xsl:attribute name="class">
  405.                 <xsl:value-of select="translate(@table:style-name,
  406.                     '.','_')"/>
  407.             </xsl:attribute>
  408.         </xsl:if>
  409.         <xsl:if test="@table:number-columns-spanned">
  410.             <xsl:attribute name="colspan">
  411.                 <xsl:value-of select="@table:number-columns-spanned"/>
  412.             </xsl:attribute>
  413.         </xsl:if>
  414.         <xsl:if test="@table:number-rows-spanned">
  415.             <xsl:attribute name="rowspan">
  416.                 <xsl:value-of select="@table:number-rows-spanned"/>
  417.             </xsl:attribute>
  418.         </xsl:if>
  419.         <xsl:apply-templates/>
  420.         </td>
  421.         <xsl:call-template name="process-table-cell">
  422.             <xsl:with-param name="n" select="$n - 1"/>
  423.         </xsl:call-template>
  424.     </xsl:if>
  425. </xsl:template>
  426.  
  427. <xsl:template match="text:tab">
  428.     <xsl:text xml:space="preserve">    </xsl:text>
  429. </xsl:template>
  430.  
  431. <xsl:template match="text:line-break">
  432.     <br />
  433. </xsl:template>
  434.  
  435. <xsl:variable name="spaces"
  436.     xml:space="preserve">                              </xsl:variable>
  437.  
  438. <xsl:template match="text:s">
  439. <xsl:choose>
  440.     <xsl:when test="@text:c">
  441.         <xsl:call-template name="insert-spaces">
  442.             <xsl:with-param name="n" select="@text:c"/>
  443.         </xsl:call-template>
  444.     </xsl:when>
  445.     <xsl:otherwise>
  446.         <xsl:text> </xsl:text>
  447.     </xsl:otherwise>
  448. </xsl:choose>
  449. </xsl:template>
  450.  
  451. <xsl:template name="insert-spaces">
  452. <xsl:param name="n"/>
  453. <xsl:choose>
  454.     <xsl:when test="$n <= 30">
  455.         <xsl:value-of select="substring($spaces, 1, $n)"/>
  456.     </xsl:when>
  457.     
  458.     <xsl:otherwise>
  459.         <xsl:value-of select="$spaces"/>
  460.         <xsl:call-template name="insert-spaces">
  461.             <xsl:with-param name="n">
  462.                 <xsl:value-of select="$n - 30"/>
  463.             </xsl:with-param>
  464.         </xsl:call-template>
  465.     </xsl:otherwise>
  466. </xsl:choose>
  467. </xsl:template>
  468.  
  469. <xsl:template match="text:a">
  470. <a href="{@xlink:href}"><xsl:apply-templates/></a>
  471. </xsl:template>
  472.  
  473. <!--
  474.     <text:bookmark-start /> and <text:bookmark-end /> can
  475.     be on non-wellformed boundaries. The quickest solution is
  476.     to create an <a name=""></a> element.
  477.     
  478.     If you don't put in any content, it becomes an empty element,
  479.     which will confuse browsers. While we would love to insert
  480.     a zero-width non-breaking space (Unicode 0x200b), Internet
  481.     Explorer doesn't recognize it.  Hence this ugly hack:
  482. -->
  483. <xsl:template match="text:bookmark-start|text:bookmark">
  484. <a name="{@text:name}"><span style="font-size: 0px"><xsl:text> </xsl:text></span></a>
  485. </xsl:template>
  486.  
  487. <!--
  488.     This template is too dangerous to leave active...
  489. <xsl:template match="text()">
  490.     <xsl:if test="normalize-space(.) !=''">
  491.         <xsl:value-of select="normalize-space(.)"/>
  492.     </xsl:if>
  493. </xsl:template>
  494. -->
  495.  
  496. <!--
  497.     This is a list of fo: attributes to be transferred to the
  498.     output document. The action tells which template is to be
  499.     called to process the attribute.
  500. -->
  501. <int:attr-map>
  502.     <int:attr name="fo:border-left" action="pass-through"/>
  503.     <int:attr name="fo:border-right" action="pass-through"/>
  504.     <int:attr name="fo:border-top" action="pass-through"/>
  505.     <int:attr name="fo:border-bottom" action="pass-through"/>
  506.     <int:attr name="fo:border" action="pass-through"/>
  507.     <int:attr name="fo:margin-left" action="pass-through"/>
  508.     <int:attr name="fo:margin-right" action="pass-through"/>
  509.     <int:attr name="fo:margin-top" action="pass-through"/>
  510.     <int:attr name="fo:margin-bottom" action="pass-through"/>
  511.     <int:attr name="fo:margin" action="pass-through"/>
  512.     <int:attr name="fo:padding-left" action="pass-through"/>
  513.     <int:attr name="fo:padding-right" action="pass-through"/>
  514.     <int:attr name="fo:padding-top" action="pass-through"/>
  515.     <int:attr name="fo:padding-bottom" action="pass-through"/>
  516.     <int:attr name="fo:padding" action="pass-through"/>
  517.     <int:attr name="fo:text-indent" action="pass-through"/>
  518.     <int:attr name="fo:font-variant" action="pass-through"/>
  519.     <int:attr name="fo:font-family" action="pass-through"/>
  520.     <int:attr name="fo:color" action="pass-through"/>
  521.     <int:attr name="fo:background-color" action="pass-through"/>
  522.     <int:attr name="fo:font-style" action="pass-through"/>
  523.     <int:attr name="fo:font-weight" action="pass-through"/>
  524.     <int:attr name="fo:line-height" action="pass-through"/>
  525.     <int:attr name="fo:text-align" action="check-align"/>
  526. </int:attr-map>
  527. </xsl:stylesheet>
  528.