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: <[EMAIL PROTECTED]> To: <[email protected]> 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 > [EMAIL PROTECTED] - email > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
