Xerces compatibility question

2002-03-26 Thread Guillaume Mathe
Hi,

On 25 Mar 2002 at 20:53, J.Pietschmann wrote:
 Generate multiple fo:page-sequence elements:  xsl:template match=/
  fo:root
fo:layout-master-set
  ...
/fo:layout-master-set
xsl:apply-templates/
  /fo:root
/xsl:template
xsl:template match=subdoc
  fo:page-sequence master-reference=...
 fo:static-content
   ...
 fo:static-content
 fo:flow
   xsl:apply-templates
 /fo:flow
  /fo:page-sequence
/xsl:template
 
 Look up the initial-page-number attribute for fo:page-sequence
 starting with something else than page 1.
 
 J.Pietschmann

Thanx a lot, it works like a charm :)

Now i have another question, this time about Xerces lib. FOP is being used 
together with other tools in a web server-based app. This app uses the latest 
version of Xerces (2.0.1).
I tried to run FOP with both the 1.2.3 and 2.0.1 and i have the following 
problems:
- with 1.2.3 i get :
[ERROR]: Error in content-type property value 'content-type:image/jpg': 
org.apache.fop.fo.expr.PropertyException: illegal character
for the following item:
fo:external-graphic content-type=content-type:image/jpg width=150px 
height=34px src=hello.jpg /
- with 2.0.1 i get an unnamed/empty FOPException (FOPException is thrown with 
no parameter), because of flow-name not being xsl-region-after but a named 
region 
(i.e. fo:static-content flow-name=myname)

Since my app already makes use of xerces 2.0.1, i would be nice to have FOP 
working with it as well :p
What's wrong with my external-graphic ?
What are the plans concerning integration of xerces 2 with FOP ?

Regards,
Guillaume Mathe
Smartinnov



Re: Page sequence error

2002-03-26 Thread Guillaume Mathe
Hi,

On 26 Mar 2002 at 9:57, Alastair Growcott wrote:

 When running FOP on my XML document via XSL, I get the following error:
 
 [ERROR]: org.apache.fop.apps.FOPException: 'master-reference' for
 'fo:page-sequence'matches no 'simple-page-master' or
 'page-sequence-master'
 

FOP conforms to the latest specs - thus your 'master-name' in 'page-sequence' 
should be replaced with 'master-reference'. This holds true for other objects 
as 
well, take a look at FOP release notes:
http://xml.apache.org/fop/relnotes.html

Regards,
Guillaume Mathe
Smartinnov


Caught the exception !

2002-03-25 Thread Guillaume Mathe
I had to use the command line. Here's what i get:

javax.xml.transform.TransformerException
at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1212)
at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
at java.lang.Thread.run(Thread.java:484)
-
java.lang.NullPointerException
at 
org.apache.fop.fo.pagination.PageSequence.isFlowForMasterNameDone(PageSequence.java:591)
at 
org.apache.fop.fo.pagination.PageSequence.getNextPageMasterName(PageSequence.java:477)
at 
org.apache.fop.fo.pagination.PageSequence.getNextSimplePageMaster(PageSequence.java:455)
at 
org.apache.fop.fo.pagination.PageSequence.getNextPageMaster(PageSequence.java:523)
at 
org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:334)
at 
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:268)
at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182)
at 
org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:284)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:749)
at 
org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at 
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2029)
at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1189)
at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
at java.lang.Thread.run(Thread.java:484)

(plz see my previous post to know what it's all about)

Regards,
Guillaume Mathe
Smartinnov



Oops let me reformulate - page sequence reset ?

2002-03-25 Thread Guillaume Mathe
Hi,

I've solved that exception problem - it was only a matter of 'master-name' 
instead of 'master-reference' in 'conditional-page-master-reference'.
Anyway, i don't have the expected results.
How can i start over the page-sequence each time i start a new subdoc ? This 
way i have a new 'first', 'rest' etc.. set of pages.

For those who missed the first post, here's a xml structure i have:
doc
 subdoc
  part-a/
  part-b/
 /subdoc
 subdoc
  part-a/
  part-b/
 /subdoc
...
/doc

part-a is one-page, part-b is multi-page.
I want special static contents on each part-a, and other static contents on 
each part-b.
So what's the best way to do this ?


Regards,
Guillaume Mathe
Smartinnov