Hi, Pardha,

I've done lots of work with WordML, so I can get you started on this one.

Insert -> Page Break produces the following element in Word's XML output (in 
the paragraph's text run):

<w:br w:type="page"/>

When you do it from the paragraph properties, you get the following element (in 
the pPr element for the paragraph):

<w:pageBreakBefore/>

So, to catch them both, you need corresponding templates, thus:

<xsl:template match="w:pageBreakBefore">
  <!-- Do whatever you do with page breaks here -->
</xsl:template>

<xsl:template match="w:[EMAIL PROTECTED]:type='page']">
  <!-- Do whatever you do with page breaks here -->
</xsl:template>

If you do the same thing with the two kinds of breaks, you can process them in 
the same template, thus:

<xsl:template match="w:pageBreakBefore|w:[EMAIL PROTECTED]:type='page']">
  <!-- Do whatever you do with page breaks here -->
</xsl:template>

HTH

Jay Bryant
Bryant Communication Services

  ----- Original Message ----- 
  From: Pardha Paruchuri 
  To: fop-users@xmlgraphics.apache.org 
  Sent: Monday, April 02, 2007 12:56 PM
  Subject: word page break


  Hi All,

  I am using FOP 0.20.5 to convert a WordML document into PDF. As there are 2 
types of pagebreaks in word, one the hard/soft page break(from menu 
insert->page break) and two the pagebreakbefore property on a 
paragraph(highlight a paragraph and right click to see properties), I see that 
it is able to convert a pagebreakbefore but not the hard page break. I am just 
using a stylesheet that microsoft recommends to convert WordML into XML-FO and 
I could not figure out where we can make a change in the stylesheet to fix this 
issue. As I am new to XSL and understand that this may not be a FOP problem but 
could someone give me a clue as to why it is not able to convert a hard page 
break.

  Thanks,
  Pardha


------------------------------------------------------------------------------
  Looking for earth-friendly autos? 
  Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. 

Reply via email to