Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - RE: How to fix Inferred xslt transform? How to fix Inferred xslt transform?To: NULL Date: 6/1/2005 8:22:00 PM I have created a formatted seed xlm file, which I fed to wxml2xslt.ext, the
MS Office 2003 WordprocessingML Transform Inference Tool. I put in a bunch
of garish colors and formats, and it came out pretty much as I wanted. The
ARDishlistbyTable.doc file, in the attached zip, is the output of that
transform when it is run against the full xlm source file. My seed file had
just three ingredients in the list, and I was able to nudge the elements in
the marked up seed file so that they were placed in the cell single-spaced.
When I ran the transform against the entire source file, the first three
ingredients come out single spaced, but the rest of the ingredients are
positioned as single spaced. I think the following is the part of the xslt
that controls this. What would I change to force the ingredients for
position greater than three to be single spaced in the cell?
<xsl:template
match="/ns0:dishlist/ns0:dishInstance/ns0:ingredient[position() >= 3]">
<ns0:ingredient>
<xsl:for-each select="@ns0:*|@*[namespace-uri()='']">
<xsl:attribute name="{name()}" namespace="{namespace-uri()}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:for-each>
<xsl:apply-templates select="text()" />
<w:p>
<w:pPr>
<w:ind w:left="1080" />
<w:rPr>
<w:rFonts w:ascii="Garamond" w:h-ansi="Garamond" />
<wx:font wx:val="Garamond" />
<w:b />
<w:color w:val="FFFF00" />
</w:rPr>
</w:pPr>
<xsl:apply-templates select="ns0:greed" />
<w:r>
<w:rPr>
<w:rFonts w:ascii="Garamond" w:h-ansi="Garamond" />
<wx:font wx:val="Garamond" />
<w:b />
<w:color w:val="FFFF00" />
</w:rPr> <w:t><xsl:text> </xsl:text></w:t></w:r>
<xsl:apply-templates select="ns0:quantity" />
<w:r>
<w:rPr>
<w:rFonts w:ascii="Garamond" w:h-ansi="Garamond" />
<wx:font wx:val="Garamond" />
<w:b />
<w:color w:val="FFFF00" />
</w:rPr> <w:t><xsl:text> </xsl:text></w:t></w:r>
<xsl:apply-templates select="ns0:englishMeasure" />
</w:p>
<w:p>
<w:pPr>
<w:ind w:left="720" />
<w:rPr>
<w:rFonts w:ascii="Garamond" w:h-ansi="Garamond" />
<wx:font wx:val="Garamond" />
<w:b />
<w:color w:val="FFFF00" />
</w:rPr>
</w:pPr>
</w:p>
</ns0:ingredient>
</xsl:template>
--
Hollis D Paul [Outlook - MVP]
emorchadok
Mukilteo, WA USA
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
