Re: Markers and Extension Functions

2003-11-06 Thread Chris Bowditch
From: Chris Pratt [EMAIL PROTECTED]
snip/
fo:block color=white background-color=black font-size=24pt 
font-variant=small-caps font-weight=bold text-align=center 
padding-before=1mm
  xsl:call-template name=state-name
xsl:with-param name=abbrev
  fo:retrieve-marker retrieve-class-name=state 
retrieve-position=first-starting-within-page/
/xsl:with-param
  /xsl:call-template
/fo:block

How would I call the getStateName function with the marker value as it's 
parameter?  Thanks.
You cant. There are two separate processes that occur to transform XML+XSL 
to PDF. The XSLT stage generates a XSL-FO document from your XML+XSL. FOP 
then renders XSL-FO to PDF. The value of the marker is not known until FOP 
does it processing, so you cant see its value at the XSLT stage!

Why would you want to pass the value of a marker to a template anyway? You 
have to set the value of the marker using fo:marker in the first place. So 
surely you could write some XSLT to find the value of the marker from the 
source XML file.

BTW: As Glen pointed out, XSL questions are better suited to the XSL list:
http://www.biglist.com/lists/xsl-list/
Chris
_
Find a cheaper internet access deal - choose one to suit you. 
http://www.msn.co.uk/internetaccess

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Markers and Extension Functions

2003-11-05 Thread Glen Mazza
Chris, *please*, ask these questions on the Mulberry
XSL list.

Glen

--- Chris Pratt [EMAIL PROTECTED] wrote:
 I currently have a callable template that converts
 state abbreviations to their names.  We're trying to


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: markers

2002-02-28 Thread Christian Geisert
Savino, Matt C wrote:
So that's two new jar files, logging errors, no benchmarking output and
broken markers in .20.3. Looks like I'm going to have to live w/o

Hey you forgot removed PNG support ;-)
Which benchmarking output do you mean ? There is some info if you invoke 
fop with the -d switch.

keep-with-next until the redesign.
Matt Savino

Christian



Re: markers

2002-02-28 Thread Etwin van Krimpen
Arved,

I would appreciate that. One of the reasons to turn to (at this moment
evaluation-version of) XEP is that XEP works fine with marker-retrieve
marker.

Regards, Etwin

- Original Message -
From: Arved Sandstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 12:41 AM
Subject: RE: markers


 Hi, Bart

 I took markers up to a certain point last summer. I didn't have the
property
 re-parenting happening yet, but in terms of retrieving the right marker
 probably about half the retrieve-position/retrieve-boundary combos were
 already functional. The example file glossary.xml stems from that period.

 We had an injection of code just about that time that was generally held
to
 be higher priority, including by me, and this broke the partial marker
 support. I don't think anything has happened since, and so you are
probably
 seeing the effects of this, not doing anything wrong in your FO.

 I am loathe to invest any effort in marker support in the maintenance
 branch, unless Karen and/or Keiron were to indicate that they do not
expect
 functional markers in the rewrite for at least another 3 months (by which
I
 mean I'd be happy to actually write that code if they indicate that I
could
 reasonably expect to be doing so within 3 months). If it looks like there
 won't be any markers in the rewrite for quite a while then I'd be happy to
 look at getting them back into the maintenance branch because it wouldn't
be
 wasted effort.

 Regards,
 Arved Sandstrom

 -Original Message-
 From: Bart Locanthi [mailto:[EMAIL PROTECTED]
 Sent: February 26, 2002 7:26 PM
 To: [EMAIL PROTECTED]
 Subject: markers


 does fop support markers? i'm having trouble getting them to work.

 my input looks like
 ...
 fo:flow
   fo:block
 fo:block
   fo:marker marker-class-name=chapchapter one/fo:marker
   ...
 /fo:block
   /fo:block
   fo:block
 fo:block
   fo:marker marker-class-name=chapchapter two/fo:marker
 ...

 note that the markers share a common great-grandparent.

 the error message i get from any fop-0.20.[23] is:

 [ERROR]: fo:marker must be an initial child,and 'marker-class-name' must
 be unique for same parent.

 i'm following all the rules, i think, but no joy.

 sounds like a simple misconception on my part but i'm stumped.




Re: markers

2002-02-27 Thread Chuck Paussa
Hi Bart,
I've done some playing with markers also and gotten them to work pretty 
well. One of the things I've noticed is that FOP complains mightily 
about both fo:marker must be an initial child and marker-class-name' 
must be unique for same parent.but, they are recoverable errors and can 
be ignored.

Here's an XML and XSL to demonstrate the capabilities. Notice that I 
place a marker at the beginning and end of each marked block (That's 
strictly illegal! But it works) I also have placed an x in the illegal 
marker contents so you can see the illegal retrieval. I do that so that 
the functions first-including-carryover and last-ending-within-page will 
work. Arved did a great job of implementing markers, you just have to 
break the rules for now (and be prepared to unbreak the rules  when FOP 
has a correct implementation)

fop -xsl dictionary.xsl -xml dictionary.xml -pdf dictionary.pdf
Chuck
Bart Locanthi wrote:
does fop support markers? i'm having trouble getting them to work.
my input looks like
...
fo:flow
 fo:block
   fo:block
 fo:marker marker-class-name=chapchapter one/fo:marker
 ...
   /fo:block
 /fo:block
 fo:block
   fo:block
 fo:marker marker-class-name=chapchapter two/fo:marker
...
note that the markers share a common great-grandparent.
the error message i get from any fop-0.20.[23] is:
[ERROR]: fo:marker must be an initial child,and 'marker-class-name' 
must be unique for same parent.

i'm following all the rules, i think, but no joy.
sounds like a simple misconception on my part but i'm stumped.

root
	blockOne/block
	blockTwo/block
	blockThr/block
	blockFou/block
	blockFiv/block
	blockSix/block
	blockSev/block
	blockEig/block
	blockNin/block
	blockTen/block
	blockEle/block
	blockTwe/block
	blockThi/block
	blockFor/block
	blockFif/block
	blockSex/block
	blockSiv/block
	blockEgg/block
	blockNon/block
/root?xml version=1.0?

xsl:stylesheet
		version=1.0
		xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
		xmlns:fo=http://www.w3.org/1999/XSL/Format;
		exclude-result-prefixes=fo

xsl:output method=xml version=4.0 omit-xml-declaration=yes indent=yes/

xsl:template match=/

			fo:root
fo:layout-master-set
	fo:simple-page-master master-name  =page-first
			page-height  =8.5in
			page-width   =11in
		fo:region-body margin-top   =5cm
		margin-bottom=.5in
		margin-left  =.5in
		margin-right =.5in
		column-count =3/
		fo:region-before extent=6cm/
	/fo:simple-page-master
/fo:layout-master-set

fo:page-sequence master-name=page-first
	fo:static-content flow-name=xsl-region-before
		fo:table
			fo:table-column column-width=5.5in/
			fo:table-column column-width=5.5in/
			fo:table-body
fo:table-row
	fo:table-cell
		fo:block keep-together=auto
			first-starting-within-page:
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=first-starting-within-page/
		/fo:block
	/fo:table-cell
	fo:table-cell
		fo:block keep-together=auto text-align=end
			first-including-carryover :
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=first-including-carryover/
		/fo:block
	/fo:table-cell
/fo:table-row
fo:table-row
	fo:table-cell
		fo:block keep-together=auto
			last-starting-within-page :
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=last-starting-within-page/
		/fo:block
	/fo:table-cell
	fo:table-cell
		fo:block keep-together=auto text-align=end
			last-ending-within-page   :
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=last-ending-within-page/
		/fo:block
	/fo:table-cell
/fo:table-row
			/fo:table-body
		/fo:table
	/fo:static-content
	fo:flow flow-name=xsl-region-body

		xsl:for-each select=/root/block
			xsl:variable name=this select=./
			fo:blockfo:marker marker-class-name=entryxsl:value-of select=.//fo:marker
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of 

RE: markers

2002-02-27 Thread Arved Sandstrom
Interesting...I didn't realise that that much was still functional. :-) I
will have to revisit and see what the scope of potential fixes is.

AHS

-Original Message-
From: Chuck Paussa [mailto:[EMAIL PROTECTED]
Sent: February 27, 2002 12:48 PM
To: [EMAIL PROTECTED]
Subject: Re: markers


Hi Bart,

I've done some playing with markers also and gotten them to work pretty
well. One of the things I've noticed is that FOP complains mightily
about both fo:marker must be an initial child and marker-class-name'
must be unique for same parent.but, they are recoverable errors and can
be ignored.

Here's an XML and XSL to demonstrate the capabilities. Notice that I
place a marker at the beginning and end of each marked block (That's
strictly illegal! But it works) I also have placed an x in the illegal
marker contents so you can see the illegal retrieval. I do that so that
the functions first-including-carryover and last-ending-within-page will
work. Arved did a great job of implementing markers, you just have to
break the rules for now (and be prepared to unbreak the rules  when FOP
has a correct implementation)

fop -xsl dictionary.xsl -xml dictionary.xml -pdf dictionary.pdf

Chuck



RE: markers

2002-02-26 Thread Arved Sandstrom
Hi, Bart

I took markers up to a certain point last summer. I didn't have the property
re-parenting happening yet, but in terms of retrieving the right marker
probably about half the retrieve-position/retrieve-boundary combos were
already functional. The example file glossary.xml stems from that period.

We had an injection of code just about that time that was generally held to
be higher priority, including by me, and this broke the partial marker
support. I don't think anything has happened since, and so you are probably
seeing the effects of this, not doing anything wrong in your FO.

I am loathe to invest any effort in marker support in the maintenance
branch, unless Karen and/or Keiron were to indicate that they do not expect
functional markers in the rewrite for at least another 3 months (by which I
mean I'd be happy to actually write that code if they indicate that I could
reasonably expect to be doing so within 3 months). If it looks like there
won't be any markers in the rewrite for quite a while then I'd be happy to
look at getting them back into the maintenance branch because it wouldn't be
wasted effort.

Regards,
Arved Sandstrom

-Original Message-
From: Bart Locanthi [mailto:[EMAIL PROTECTED]
Sent: February 26, 2002 7:26 PM
To: [EMAIL PROTECTED]
Subject: markers


does fop support markers? i'm having trouble getting them to work.

my input looks like
...
fo:flow
  fo:block
fo:block
  fo:marker marker-class-name=chapchapter one/fo:marker
  ...
/fo:block
  /fo:block
  fo:block
fo:block
  fo:marker marker-class-name=chapchapter two/fo:marker
...

note that the markers share a common great-grandparent.

the error message i get from any fop-0.20.[23] is:

[ERROR]: fo:marker must be an initial child,and 'marker-class-name' must
be unique for same parent.

i'm following all the rules, i think, but no joy.

sounds like a simple misconception on my part but i'm stumped.