xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Bryant" <...@bryantcs.com>
Subject Re: Help with table-of-contents:don't understand ref-id attribute
Date Fri, 03 Mar 2006 16:58:21 GMT
Hi, Charles,

It is certainly true that the value of ref-id can be an element rather than
an attribute. It doesn't even necessarily have to be a child of the element
whose page number you want. I've bumped into XML that had ref values as
top-level elements next to the heading elements. Of course, either an
attribute or a child element makes for much nicer XSL.

My first thought is that you have a context issue: The name node must be a
child of the current context node. Unless you've used a for-each or some
other structure to force the context to be the heading (or whatever) for
which you are trying to get a page number, the processor can never find that
node. I know you are a regular on the Mulberry XSLT list, though, so I bet
you have already accounted for that possibility.

Can you post some of your XML source and the relevent parts of your
stylesheet or make a trimmed-down demonstration of the problem? If so, I'll
be happy to try to help figure out the problem.

Jay Bryant
Bryant Communication Services


----- Original Message ----- 
From: <cknell@onebox.com>
To: <fop-users@xmlgraphics.apache.org>
Sent: Friday, March 03, 2006 10:16 AM
Subject: Help with table-of-contents:don't understand ref-id attribute


> I'm having a problem with producing a table of contents. This is my first
attempt. As part of the template to produce a line in the table of contents,
I have this element:
>
> <fo:page-number-citation ref-id="{name}" />
>
> The quote below is from the fo:page-number-citation section of the
recommendation. I find the construction "id trait" puzzling. It seems that
the authors have gone out of their way to avoid the term "attribute", so I
infer that the value of the ref-id attribute does not, itself, have to point
to an attribute, but instead could point to a child element of the object of
interest, so long as it is unique.
>
> "The cited page-number is the number of the page containing, as a
descendant, the first normal area returned by the formatting object with an
id trait matching the ref-id trait of the fo:page-number-citation (the
referenced formatting object)."
>
> However I certainly have something wrong. When I attempt to process the
XSL-FO document with fop 0.20.5, I get this error message:
>
> "[ERROR] null".
>
> Can anyone tell me where I'm going wrong? Thanks.
> -- 
> Charles Knell
> cknell@onebox.com - email
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message