Re: How do I add subscripts dynamically ? Guru needed...

2008-07-03 Thread knoxor

Hi Andreas,

Thanks for the reply.

At the minute the sup tag is simply a html tag embedded into a text
string.
e.g this is the body of text that has xsup2/sup embedded in it

The xml for this is (statement and statementbody are xml nodes created in my
application)

...
statement
   statementbodythis is the body of text that has xsup2/sup embedded
in it/statementbody
statement


If I was to have the sup tags incorporated into the XML node structure how
would it look ?

forgive me but xslt translations are not my forte.

thanks


When you suggest having an XML node do you mean 


Andreas Delmelle-2 wrote:
 
 On Jul 2, 2008, at 18:25, Andreas Delmelle wrote:
 
 On Jul 2, 2008, at 18:14, knoxor wrote:

 snip /
 My xslt translation file has the following:

 xsl:for-each select=statement
 fo:block padding-bottom=2mm text-align=justify keep-with- 
 next=always
 font-size=10pt 
 xsl:value-of select=statement/
 /fo:block
 /xsl:for-each

 Will I have to reformat how the xml file is generated to enable me to
 process the sup tags? eg.

 It depends. If sup is a real XML node (i.e. not lt;supgt;),  
 then the solution could be as simple as adding a matching template  
 for them, like:

 xsl:template match=sup
   fo:inline baseline-shift=super
 xsl:apply-templates /
   /fo:inline
 /xsl:template
 
 Sorry, forgot to mention that your for-each also needs to be slightly  
 adjusted to something like:
 
 xsl:for-each select=statement/statementBody
fo:block ...
  xsl:apply-templates /
/fo:block
 /xsl:for-each
 
 To make sure the matching template for 'sup' is actually used...
 
 
 
 Cheers
 
 Andreas
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-do-I-add-subscripts-dynamically---Guru-needed...-tp18241306p18254612.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: How do I add subscripts dynamically ? Guru needed...

2008-07-03 Thread Andreas Delmelle

On Jul 3, 2008, at 10:42, knoxor wrote:

Hi


At the minute the sup tag is simply a html tag embedded into a text
string.
e.g this is the body of text that has xsup2/sup embedded in it

The xml for this is (statement and statementbody are xml nodes  
created in my

application)

...
statement
   statementbodythis is the body of text that has xsup2/sup  
embedded

in it/statementbody
statement


If it looks like this, it should be recognized by the XML parser as a  
separate element-node.

In SAX-terms, the parser would report something like:

startElement('statement')
  characters('#x0A;')
  startElement('statementBody')
characters('this is the body of text that has x')
startElement('sup')
  characters('2')
endElement('sup')
characters(' embedded#x0A;in it')
  endElement('statementBody')
  characters('#x0A;')
endElement('statement')

This means that the code I gave should work, if implemented correctly.

If you use XSLT-code like in your original example:

xsl:value-of select=statement /

This would simply return the text-value of the statement-element.

If the sup tag would be bare character data, at least the less-than  
sign would appear escaped as 'lt;', or the entire sup tag would be  
contained in a CDATA section.



HTH!

Cheers

Andreas

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



Re: Forward references in marker element throws NPE

2008-07-03 Thread Andreas Delmelle

On Jul 2, 2008, at 19:54, Andreas Delmelle wrote:


On Jul 2, 2008, at 11:30, Browning, Jamie wrote:

Hi Jamie

If there is any way in which I can positively influence the  
decision to

include this patch then I would like to do so.


You're playing with fire here... |8-

In the meantime, I have already applied the changes. It's literally  
only a hit on the Enter button away from being committed to the  
release branch.


Just FYI: this is done.

Cheers

Andreas

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



fo:list-item - Keep together

2008-07-03 Thread bonekrusher

Hi,

How do I keep a list-item's contents from splitting on a page break? I've
tried using keep-together=always, but it still splits the contents.

xsl:template match=NOTE
fo:list-block provisional-distance-between-starts=7mm
provisional-label-separation=5mm start-indent=2mm
space-before.optimum=4pt space-after.optimum=4pt
xsl:for-each select=PARA
fo:list-item keep-together=always
fo:list-item-label 
end-indent=label-end()
fo:blockNOTE:/fo:block
/fo:list-item-label
fo:list-item-body start-indent=15mm 
keep-together=always
fo:block
xsl:apply-templates 
select=./
/fo:block
/fo:list-item-body
/fo:list-item
/xsl:for-each
/fo:list-block
/xsl:template
-- 
View this message in context: 
http://www.nabble.com/fo%3Alist-item---Keep-together-tp18266211p18266211.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



RE: list-item - Keep together

2008-07-03 Thread Griffin,Sean
Which version of FOP are you using?  First of all, if you want to keep within a 
page you should say keep-together.within-page instead of just keep-together.  
Second, you should need keep-together only on the list-item and not also on the 
list-item-block.  And finally, this doesn't appear to work in FOP 0.20.5.  But 
I did try 0.94 and 0.95beta, and those both work just fine.

-Original Message-
From: bonekrusher [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2008 1:58 PM
To: fop-users@xmlgraphics.apache.org
Subject: fo:list-item - Keep together


Hi,

How do I keep a list-item's contents from splitting on a page break? I've
tried using keep-together=always, but it still splits the contents.

xsl:template match=NOTE
fo:list-block provisional-distance-between-starts=7mm
provisional-label-separation=5mm start-indent=2mm
space-before.optimum=4pt space-after.optimum=4pt
xsl:for-each select=PARA
fo:list-item keep-together=always
fo:list-item-label 
end-indent=label-end()
fo:blockNOTE:/fo:block
/fo:list-item-label
fo:list-item-body start-indent=15mm 
keep-together=always
fo:block
xsl:apply-templates 
select=./
/fo:block
/fo:list-item-body
/fo:list-item
/xsl:for-each
/fo:list-block
/xsl:template
-- 
View this message in context: 
http://www.nabble.com/fo%3Alist-item---Keep-together-tp18266211p18266211.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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

--
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.

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