- Timestamp:
- 08/13/10 09:44:39 (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docx4j/src/main/java/org/docx4j/convert/out/pdf/viaXSLFO/docx2fo.xslt
r1182 r1185 19 19 <!-- ======================================= 20 20 21 This is the beginnings of a basic XSLT 22 to convert WordML2FO. 21 This is an XSLT to convert WordML2FO. 23 22 24 23 I'm not aware of any more complete … … 349 348 <xsl:template match="w:pPr | w:rPr" /> <!-- handle via extension function --> 350 349 351 <xsl:template match="w:r"> 350 <xsl:template match="w:r"> 351 352 352 <xsl:choose> 353 <xsl:when test="w:rPr"> 354 <!-- Invoke an extension function, so we can use 355 docx4j to populate the fo:block --> 353 <xsl:when test="java:org.docx4j.convert.out.pdf.viaXSLFO.InField.getState($modelStates)" > 354 <!-- in a field, so ignore, unless this run contains a fldChar or instrText --> 355 356 <xsl:if test="w:fldChar"><xsl:apply-templates/></xsl:if> 357 358 <xsl:if test="w:instrText"><xsl:apply-templates/></xsl:if> 359 360 </xsl:when> 361 <xsl:otherwise> 356 362 357 <xsl:variable name="childResults"> 358 <xsl:apply-templates/> 359 </xsl:variable> 363 <xsl:choose> 364 <xsl:when test="w:rPr"> 365 <!-- Invoke an extension function, so we can use 366 docx4j to populate the fo:block --> 367 368 <xsl:variable name="childResults"> 369 <xsl:apply-templates/> 370 </xsl:variable> 360 371 361 <!-- <xsl:variable name="pPrNode" select="../w:pPr" /> -->362 <xsl:variable name="rPrNode" select="w:rPr" />372 <!-- <xsl:variable name="pPrNode" select="../w:pPr" /> --> 373 <xsl:variable name="rPrNode" select="w:rPr" /> 363 374 364 <xsl:copy-of select="java:org.docx4j.convert.out.pdf.viaXSLFO.Conversion.createBlockForRPr(365 $wmlPackage, $rPrNode, $childResults)" />375 <xsl:copy-of select="java:org.docx4j.convert.out.pdf.viaXSLFO.Conversion.createBlockForRPr( 376 $wmlPackage, $rPrNode, $childResults)" /> 366 377 367 </xsl:when> 368 <xsl:otherwise> 369 <xsl:apply-templates/> 370 </xsl:otherwise> 371 </xsl:choose> 378 </xsl:when> 379 <xsl:otherwise> 380 <xsl:apply-templates/> 381 </xsl:otherwise> 382 </xsl:choose> 383 384 </xsl:otherwise> 385 386 </xsl:choose> 387 372 388 373 389 </xsl:template> … … 744 760 <xsl:template match="w:fldChar" > 745 761 <xsl:copy-of 746 select="java:org.docx4j.convert.out.pdf.viaXSLFO.Conversion.notImplemented(., '' )" /> 747 </xsl:template> 762 select="java:org.docx4j.convert.out.pdf.viaXSLFO.InField.updateState($modelStates, .)" /> 763 </xsl:template> 764 748 765 <xsl:template match="w:instrText" > 766 <xsl:variable name="childResults"> 767 <xsl:apply-templates/> 768 </xsl:variable> 769 749 770 <xsl:copy-of 750 select="java:org.docx4j.convert.out.pdf.viaXSLFO.Conversion.notImplemented(., 'no support for fields' )" /> 771 select="java:org.docx4j.convert.out.pdf.viaXSLFO.Conversion.createBlockForInstrText( 772 $wmlPackage, ., $childResults)" /> 751 773 </xsl:template> 752 774
Note: See TracChangeset
for help on using the changeset viewer.
