[xsl] Pulling xml attributes

Subject: [xsl] Pulling xml attributes
From: Luke Jones <ljones@xxxxxxxxxx>
Date: Thu, 28 Jun 2007 12:06:15 -0500
XSL Experts,

I have an xml document that contains the tags and attributes I need to
create a table in a pdf document.  I'm using FOP to do this.  The xml
document looks like:

<colspec colname="col1" colwidth="2.09" /><colspec align="right"
colname="col2" colwidth="0.82" /><colspec align="right" colname="col3"
colwidth="0.73" /><colspec align="right" colname="col4"
colwidth="0.72" /><colspec align="right" colname="col5"
colwidth="0.67" />
<entry colsep="0" rowsep="0" />
<entry colsep="0" rowsep="0" />
<entry colsep="0" rowsep="0" />
<entry align="center" colsep="0" rowsep="0">Additional</entry>
<entry colsep="0" rowsep="0" />

I have template that tries to use all of this information to build the
table, and it looks like:

<xsl:template match = "table">
 <xsl:for-each select = "tgroup">
  <xsl:for-each select = "tbody/row">
   <fo:table table-layout = "fixed" width = "100%">
    <xsl:for-each select = "colspec">
     <fo:table-column column-width="{@colwidth}in"/>
      <xsl:for-each select = "entry">
        <fo:block line-height = "16pt" text-decoration="underline"
         <xsl:value-of select = "." />

However -- it does not appear that the column-width = "{@colwidth}in" is
being recognized, because the size specifications are not being put in
there.  Rather it defaults to a proportional size for all the columns.

Does anyone see where the problem might be occurring?


Current Thread