You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Biying Huang <bi...@synthematix.com> on 2002/07/30 22:37:00 UTC
how to label list items
I am new to XSLT and FOP. Can some one help me to number the list item
in the order they appear in the input XML document. I have this code,
but it doesn't work:
<fo:list-item>
<fo:list-item-label end-indent="1.0cm">
<fo:block>
<xsl:value-of select="postion()"/>.
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="0.5cm">
<fo:block>
<xsl:value-of select="."/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
Thanks.
list-item alignement
Posted by Rodolphe VAGNER <ro...@eurodoc-sofilog.com>.
Hy,
I use lists but I got some trouble with the items : they are displayed too
high,
I mean that the bullet not seems to be on the same line :
BULLET
TEXT TEXT TEXT TEXT TEXT...
but the difference between is not a line but half a line.
I tried to correct with vertical-align property but it's not good.
Can someone help ?
Re: text-decoration
Posted by sascha <sa...@assbach.de>.
ok, i just tried out something:
<xsl:if test='contains(dxl:font/@style,"subscript")'>
<xsl:attribute name="vertical-align">sub</xsl:attribute>
<xsl:attribute name="font-size"><xsl:value-of
select="number(substring-before(dxl:font/@size,'pt'))-4"/>pt</xsl:attribute>
</xsl:if>
<xsl:if test='contains(dxl:font/@style,"superscript")'>
<xsl:attribute name="vertical-align">super</xsl:attribute>
<xsl:attribute name="font-size"><xsl:value-of
select="number(substring-before(dxl:font/@size,'pt'))-4"/>pt</xsl:attribute>
</xsl:if>
and it seems to work.
Sascha
----- Original Message -----
From: "sascha" <sa...@assbach.de>
To: <fo...@xml.apache.org>
Sent: Monday, August 05, 2002 10:21 AM
Subject: Re: text-decoration
> ----- Original Message -----
> From: "J.Pietschmann" <j3...@yahoo.de>
>
>
> > baseline-shift is not implemented, use vertical-align
> > instead (I think).
>
> is this a real workaround for sub and super-script?
> anyone done this before?
>
> Sascha
>
Re: text-decoration
Posted by sascha <sa...@assbach.de>.
----- Original Message -----
From: "J.Pietschmann" <j3...@yahoo.de>
> baseline-shift is not implemented, use vertical-align
> instead (I think).
is this a real workaround for sub and super-script?
anyone done this before?
Sascha
Re: text-decoration
Posted by sascha <sa...@assbach.de>.
gosh, that is NOT GOOD!
sshhh.
thanks anyway.
Sascha
----- Original Message -----
From: "J.Pietschmann" <j3...@yahoo.de>
To: <fo...@xml.apache.org>
Sent: Friday, August 02, 2002 9:43 PM
Subject: Re: text-decoration
> sascha wrote:
> > What's wrong here?
> > My XSL seems to apply the styles quite right, but the output is not like
it
> > should be...
> > its only green 12pt and the word "machen" is italic- no strike-through,
no
> > sub or super shifts?!
>
> baseline-shift is not implemented, use vertical-align
> instead (I think).
>
> fo:wrapper doesn't set the text decoration for some odd
> reason, it is basically lost. Try fo:inline instead.
>
> J.Pietschmann
>
Re: text-decoration
Posted by "J.Pietschmann" <j3...@yahoo.de>.
sascha wrote:
> What's wrong here?
> My XSL seems to apply the styles quite right, but the output is not like it
> should be...
> its only green 12pt and the word "machen" is italic- no strike-through, no
> sub or super shifts?!
baseline-shift is not implemented, use vertical-align
instead (I think).
fo:wrapper doesn't set the text decoration for some odd
reason, it is basically lost. Try fo:inline instead.
J.Pietschmann
text-decoration
Posted by sascha <sa...@assbach.de>.
What's wrong here?
My XSL seems to apply the styles quite right, but the output is not like it
should be...
its only green 12pt and the word "machen" is italic- no strike-through, no
sub or super shifts?!
<fo:block space-after="2em">
<fo:wrapper color="green" font-family="sans-serif" font-size="12pt"
text-decoration="line-through">normal ist das nicht<fo:block/>aber
</fo:wrapper>
<fo:wrapper baseline-shift="super" color="green"
font-family="sans-serif" font-size="12pt">wenn man nichts</fo:wrapper>
<fo:wrapper color="green" font-family="sans-serif" font-size="12pt"
text-decoration="line-through"> machen kann'<fo:block/>was will man dann
</fo:wrapper>
<fo:wrapper baseline-shift="sub" color="green"
font-family="sans-serif" font-size="12pt"
font-style="italic">machen?</fo:wrapper>
</fo:block>
Input:
<par def="4">
<run>
<font size="12pt" style="strikethrough" name="Arial"
color="green"/>normal ist das nicht<break/>aber </run>
<run>
<font size="12pt" style="superscript" name="Arial" color="green"/>wenn
man nichts</run>
<run>
<font size="12pt" style="strikethrough" name="Arial" color="green"/>
machen kann'<break/>was will man dann </run>
<run>
<font size="12pt" style="italic subscript" name="Arial"
color="green"/>machen?</run>
</par>
Sascha
RE: how to label list items
Posted by Roland Neilands <rn...@pulsemining.com.au>.
I haven't used this myself, but I can see you have a typo:
> <fo:list-item>
> <fo:list-item-label end-indent="1.0cm">
> <fo:block>
> <xsl:value-of select="postion()"/>.
select="position()"
> </fo:block>
> </fo:list-item-label>
>
> <fo:list-item-body start-indent="0.5cm">
> <fo:block>
> <xsl:value-of select="."/>
> </fo:block>
> </fo:list-item-body>
> </fo:list-item>
Regards,
Roland