RE: Marker issue
If a qualifying marker is located in the first page (that is, an area with an attached marker, to be precise), then the locatePreviousPage() method is not called. Regards, Arved At 01:46 PM 7/27/01 +0200, GALLO Jean-Claude wrote: >But why didn't you encounter the problem. How do you write your XSL in order >to go through the transformation without seeing the error ? > >> -Message d'origine- >> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >> Date: 27 July 2001 11:24 >> À: [EMAIL PROTECTED] >> Objet: RE: Marker issue >> >> >> Quoting GALLO Jean-Claude <[EMAIL PROTECTED]>: >> >> > I do some change in RetrieveMarker code, the first page >> condition was >> > forgotten. The RetrieveMarker.layout method >> > calls RetreiveMarker.locatePrevioussPage which can retrun a >> nul value when >> > the page is the first one. I just put a test inside the >> loop looking for a >> > page containing a marker. >> >> Whoa! You're right! :-) Untested boundary condition... >> >> I'll examine your other comments, and get that into CVS. >> >> Regards, >> Arved >> >> >> --- >> This mail was sent through the Nova Scotia Provincial Server, >> with technical resources provided by Chebucto Community Net. >> http://nsaccess.ns.ca/mail/ http://www.chebucto.ns.ca/ >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, email: [EMAIL PROTECTED] >> > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, email: [EMAIL PROTECTED] > > > Fairly Senior Software Type e-plicity (http://www.e-plicity.com) Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Marker issue
But why didn't you encounter the problem. How do you write your XSL in order to go through the transformation without seeing the error ? > -Message d'origine- > De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Date: 27 July 2001 11:24 > À: [EMAIL PROTECTED] > Objet: RE: Marker issue > > > Quoting GALLO Jean-Claude <[EMAIL PROTECTED]>: > > > I do some change in RetrieveMarker code, the first page > condition was > > forgotten. The RetrieveMarker.layout method > > calls RetreiveMarker.locatePrevioussPage which can retrun a > nul value when > > the page is the first one. I just put a test inside the > loop looking for a > > page containing a marker. > > Whoa! You're right! :-) Untested boundary condition... > > I'll examine your other comments, and get that into CVS. > > Regards, > Arved > > > --- > This mail was sent through the Nova Scotia Provincial Server, > with technical resources provided by Chebucto Community Net. > http://nsaccess.ns.ca/mail/ http://www.chebucto.ns.ca/ > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Marker issue
Quoting GALLO Jean-Claude <[EMAIL PROTECTED]>: > I do some change in RetrieveMarker code, the first page condition was > forgotten. The RetrieveMarker.layout method > calls RetreiveMarker.locatePrevioussPage which can retrun a nul value when > the page is the first one. I just put a test inside the loop looking for a > page containing a marker. Whoa! You're right! :-) Untested boundary condition... I'll examine your other comments, and get that into CVS. Regards, Arved --- This mail was sent through the Nova Scotia Provincial Server, with technical resources provided by Chebucto Community Net. http://nsaccess.ns.ca/mail/ http://www.chebucto.ns.ca/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Marker issue
Quoting GALLO Jean-Claude <[EMAIL PROTECTED]>: > For my actual starting point I need to report element numerotation in a > before or after area. > I suppose this can be handle by a hastable like solution. Every time an > element is encountered, > the value may change and is reported anywhere outside the body of the page > model (I know to do that in the body area). > > So my need is very close to the XSL spec. > > Another need for me is to compute an embedded index containing, for choosen > ancestor elements, small data (eg: a title) > for each page of the PDF document the element is present. I hope Markers > can > help me to do that. That's like a Table of Content, but the table shows all > the pages of the document and the elements which are painted on each page > (generally the first one which appear on top of the page body). The table > contains as many rows as the document has pages. > > After doing that, I need to compute what I call a String page number > (different from physic page number, the one displayed by Acroread) which > behave like a chapter or subchapter numerotation (page : III.1.a, > or page : 3.1.4.1.6). Also I hope Markers behaviour will help us to support > such numerotation. So I will be able to build table (of content or indexes) > containing the logical numerotation of the pages instead of the physical > one > (actual one). Is this last need seems to be outside XSL specification ? I've attached a simple PDF that shows that some of the current marker support is OK. The XML and XSL that create this file are in CVS, under docs/examples/markers. I chose values for "retrieve-boundary" and "retrieve-position" (and a particular selection of FOs) that I know work already, fairly well - please don't assume from this that markers are ready. I think this example illustrates one of your requirements. The last one you mention, I am not sure that XSL handles this, and you said so yourself. By the way, note that the example also demonstrates the property problem that Karen Lease and myself were talking about - the children of fo:marker currently have the properties of their original FO parent, not of the parent of fo:retrieve-marker. We hope to address this soon. Regards, Arved --- This mail was sent through the Nova Scotia Provincial Server, with technical resources provided by Chebucto Community Net. http://nsaccess.ns.ca/mail/ http://www.chebucto.ns.ca/ glossary.pdf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Marker issue
I do some change in RetrieveMarker code, the first page condition was forgotten. The RetrieveMarker.layout method calls RetreiveMarker.locatePrevioussPage which can retrun a nul value when the page is the first one. I just put a test inside the loop looking for a page containing a marker. The code public Status layout(Area area) throws FOPException { // locate qualifying areas by 'marker-class-name' and // 'retrieve-boundary'. Initially we will always check // the containing page Page containingPage = area.getPage(); Marker bestMarker = searchPage(containingPage, true); // if marker not yet found, and 'retrieve-boundary' permits, // search forward by Page if ((null == bestMarker) && (retrieveBoundary != RetrieveBoundary.PAGE)) { // System.out.println("Null bestMarker and searching..."); Page currentPage = containingPage; boolean isFirstCall = true; while (bestMarker == null) { Page previousPage = locatePreviousPage(currentPage, retrieveBoundary, isFirstCall); isFirstCall = false; // System.out.println("Previous page = '" + previousPage + "'"); >> // >> if (previousPage == null) >> break; >> // bestMarker = searchPage(previousPage, false); currentPage = previousPage; } } Fop behave correctly, except while no marker are defined. In my test, the first marker is defined on page 3. There is a problem before when markers list is empty, and surprisingly, Fop return a warning containing "Warning: Some static content could not fit in the area." while we expect an empty data 8-). Since page I get the true chapter number I desire. FOP 0.19.0-CVS using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree setting up fonts formatting FOs into areas [1Warning: Some static content could not fit in the area. ] [2Warning: Some static content could not fit in the area. ] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] rendering areas to PDF writing out PDF Another surprising side effect: the footer contain a page number labelled Page "x of y". While I get the warning "Some static content..." the page number is correct (Strings "Page" and "of" are present), but when the Marker is assigned, the static strings desappear. The values "x" and "y" seem stuck, but their values are right. Everything is perfectible. Bye - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Marker issue
Dear Arved, > > >-Message d'origine- >De: Arved Sandstrom [mailto:[EMAIL PROTECTED]] >Date: 26 July 2001 12:54 >À: [EMAIL PROTECTED] >Objet: Re: Marker issue > > >At 12:31 PM 7/26/01 +0200, GALLO Jean-Claude wrote: >>Does Marker and Retrieve-Marker work or not. >> >>Reading the source code, I suppose I am able to define markers, but I get a >>Null exception when Retrieve-Marker try to get markers. >>It seems to me that the Page object don't return the true Vector struct used >>to store markers. The one returned is always empty. >>Is this work in progress or ami using markers in a bad manner ? > >Hi, Jean-Claude, > >Very definitely work in progress. :-) Not all of the data structures that >you see associated with markers are going to survive in their present form, >incidentally. > >Assuming that you are using the very latest CVS, would it be too much to ask >if you could post an FO example that does not work for you? At the very >least I could explain why, and how I intend to fix it (and when). For my actual starting point I need to report element numerotation in a before or after area. I suppose this can be handle by a hastable like solution. Every time an element is encountered, the value may change and is reported anywhere outside the body of the page model (I know to do that in the body area). So my need is very close to the XSL spec. >>6.11.3 fo:marker >>Common Usage: >> >>The fo:marker is used in conjunction with fo:retrieve-marker to produce running headers or footers. Typical >>examples include: >> >>dictionary headers showing the first and last word defined on the page. >> >>headers showing the page's chapter and section titles. - >> >>The fo:marker has to be an initial child of its parent formatting object. >>... Another need for me is to compute an embedded index containing, for choosen ancestor elements, small data (eg: a title) for each page of the PDF document the element is present. I hope Markers can help me to do that. That's like a Table of Content, but the table shows all the pages of the document and the elements which are painted on each page (generally the first one which appear on top of the page body). The table contains as many rows as the document has pages. After doing that, I need to compute what I call a String page number (different from physic page number, the one displayed by Acroread) which behave like a chapter or subchapter numerotation (page : III.1.a, or page : 3.1.4.1.6). Also I hope Markers behaviour will help us to support such numerotation. So I will be able to build table (of content or indexes) containing the logical numerotation of the pages instead of the physical one (actual one). Is this last need seems to be outside XSL specification ? >Regards, >Arved Sandstrom > >Fairly Senior Software Type >e-plicity (http://www.e-plicity.com) >Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, email: [EMAIL PROTECTED] Thanks to your answer. Sincerely - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Marker issue
At 12:31 PM 7/26/01 +0200, GALLO Jean-Claude wrote: >Does Marker and Retrieve-Marker work or not. > >Reading the source code, I suppose I am able to define markers, but I get a >Null exception when Retrieve-Marker try to get markers. >It seems to me that the Page object don't return the true Vector struct used >to store markers. The one returned is always empty. >Is this work in progress or ami using markers in a bad manner ? Hi, Jean-Claude, Very definitely work in progress. :-) Not all of the data structures that you see associated with markers are going to survive in their present form, incidentally. Assuming that you are using the very latest CVS, would it be too much to ask if you could post an FO example that does not work for you? At the very least I could explain why, and how I intend to fix it (and when). Regards, Arved Sandstrom Fairly Senior Software Type e-plicity (http://www.e-plicity.com) Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Marker issue
Does Marker and Retrieve-Marker work or not. Reading the source code, I suppose I am able to define markers, but I get a Null exception when Retrieve-Marker try to get markers. It seems to me that the Page object don't return the true Vector struct used to store markers. The one returned is always empty. Is this work in progress or ami using markers in a bad manner ? Salut - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]