[ 
https://issues.apache.org/jira/browse/FOP-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13846361#comment-13846361
 ] 

Pavel Molchanov commented on FOP-2182:
--------------------------------------

According to spec, http://www.w3.org/TR/xsl11/, region-name can have of default 
values or any custom value:

{code}
7.27.17 "region-name"

XSL Definition:
Value:  xsl-region-body | xsl-region-start | xsl-region-end | xsl-region-before 
| xsl-region-after | <name>
Initial:        see prose
Inherited:      no, a value is required
Percentages:    N/A
Media:  visual

Values have the following meanings:

xsl-region-body

    Reserved region-name for use as the default name of fo:region-body. This 
name may not be used on any other class of region.
xsl-region-start

    Reserved region-name for use as the default name of fo:region-start. This 
name may not be used on any other class of region.
xsl-region-end

    Reserved region-name for use as the default name of fo:region-end. This 
name may not be used on any other class of region.
xsl-region-before

    Reserved region-name for use as the default name of fo:region-before. This 
name may not be used on any other class of region.
xsl-region-after

    Reserved region-name for use as the default name of fo:region-after. This 
name may not be used on any other class of region.
{code}

As 'region-name' property can be customized or be different from default 
'xsl-region-body' it's better to to defer the processing of the 
StartPageSequence to the moment when 'region-name' is defined.

> org.apache.fop.render.rtf.RTFHandler.startPageSequence(RTFHandler.java:221)
> ---------------------------------------------------------------------------
>
>                 Key: FOP-2182
>                 URL: https://issues.apache.org/jira/browse/FOP-2182
>             Project: Fop
>          Issue Type: Bug
>            Reporter: Mathieu Malaterre
>         Attachments: demo.fo
>
>
> I cannot build an rtf file from a fo. It keep on failing with:
> java.lang.NullPointerException
>       at 
> org.apache.fop.render.rtf.RTFHandler.startPageSequence(RTFHandler.java:221)
>       at 
> org.apache.fop.fo.pagination.PageSequence.startOfNode(PageSequence.java:119)
>       at 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:325)
>       at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:175)
>       at 
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
>       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
> Source)
>       at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown 
> Source)
>       at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
> Source)
>       at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>  Source)
>       at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
> Source)
>       at 
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
>       at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300)
>       at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
>       at org.apache.fop.cli.Main.startFOP(Main.java:177)
>       at org.apache.fop.cli.Main.main(Main.java:208)



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to