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 Jim Chundevalel <ji...@reisys.com> on 2003/02/03 18:57:49 UTC

Block Problem

Hi,

	I'm trying to generate an XSL:FO document on the fly by taking
contents from an XML file. My XML file looks like this.


<DATATEXT>
	<SECTIONS>
		<SECTION>
			<HEADING>Test One</HEADING>
			<MATTER>This is some text</MATTER>
		</SECTION>
		<SECTION>
			<HEADING>Test Two</HEADING>
			<MATTER>This is some other text</MATTER>
		</SECTION>		
	</SECTIONS>
</DATATEXT>

I have an XSL FO Document that says

<xsl:for-each select="SECTIONS\SECTION">
	<fo:block>
		<fo:inline text-decoration="underline">
			<xsl:value-of select="HEADING"/>
		</fo:inline>
		<xsl:value-of select="MATTER"/>
	</fo:block>
</xsl:for-each>

Now, I want to underline certain words contained in the MATTER Node. For
this, I was thinking of doing like this in the XML document.

<MATTER>
	This is some 
	<fo:inline text-decoration="underline">other</fo:inline>
	text.
</MATTER>

(After referencing the fo namespace at the beginning of the XML
document.)

However, the resulting PDF document does not underline the word "other".
How do I go about doing this?

Jim



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Block Problem

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Jim Chundevalel wrote:
> Now, I want to underline certain words contained in the MATTER Node. For
> this, I was thinking of doing like this in the XML document.
> 
> <MATTER>
> 	This is some 
> 	<fo:inline text-decoration="underline">other</fo:inline>
> 	text.
> </MATTER>
> 
> (After referencing the fo namespace at the beginning of the XML
> document.)
> 
> However, the resulting PDF document does not underline the word "other".
> How do I go about doing this?

That's an XSLT question. The problem is here
<xsl:for-each select="SECTIONS\SECTION">
   <fo:block>
     <fo:inline text-decoration="underline">
       <xsl:value-of select="HEADING"/>
     </fo:inline>
     <xsl:value-of select="MATTER"/>
      ^^^^^^^^^^
Make yourself familiar with xsl:copy-of and xsl:apply-templates
and with the XSLT processing model in general. It helps to
work through a good book, the XSL FAQ has some recommendations.
For further details, ask on the XSL list:
   http://www.mulberrytech.com/xsl/xsl-list/


J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Is [border-style=dotted] already implemented ??

Posted by Clay Leeds <cl...@medata.com>.
Xavier,

Xavier Prelat wrote:
> Hi all,
> 
> Can someone can tell me if there is any resources about property values
> already implemented in current FOP version ??
> 
> I've checked http://xml.apache.org/fop/implemented.html
> 
> and it gives the list of already implemented objects and properties...
> 
> I explain :  I try tu use the "border-style" property "dotted" (or "dashed")
> value in a fo:table-cell and I can't display something else than "none" and
> "solid"....
> 
> Am I wrong or is this not implemented yet ???
> 
> regards,
> 
> Xavier

In my experience, solid is the only one which works with PRINT. However, 
others (double, dotted, etc.) work with PDF output. I've found PDF 
output to have a bit more polish than PRINT, as far as border-style goes.

OT: Also, I've filed a bug in bugzilla for rendering differences 
(apparently related to font-metrics/line-height?) between PRINT & PDF:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16772

As I look at that bug, I notice that I need to make some changes. The 
bug is not necessarily limited to AWT rendering as it indicates.
-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Is [border-style=dotted] already implemented ??

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Xavier Prelat wrote:
> Can someone can tell me if there is any resources about property values
> already implemented in current FOP version ??
> I've checked http://xml.apache.org/fop/implemented.html
> and it gives the list of already implemented objects and properties...

This is trickz. There are a lot of caveats and exceptions when it
gets into details.

> I explain :  I try tu use the "border-style" property "dotted" (or "dashed")
> value in a fo:table-cell and I can't display something else than "none" and
> "solid"....
> 
> Am I wrong or is this not implemented yet ???
It is not implemented yet for area borders.

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Is [border-style=dotted] already implemented ??

Posted by Xavier Prelat <pr...@wcentric.com>.
Hi all,

Can someone can tell me if there is any resources about property values
already implemented in current FOP version ??


I've checked http://xml.apache.org/fop/implemented.html

and it gives the list of already implemented objects and properties...

I explain :  I try tu use the "border-style" property "dotted" (or "dashed")
value in a fo:table-cell and I can't display something else than "none" and
"solid"....

Am I wrong or is this not implemented yet ???


regards,



Xavier


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Block Problem

Posted by Jim Chundevalel <ji...@reisys.com>.
Hi,

	I tried using <xsl:copy-of select="MATTER"/>. But FOP gives me
an erro saying "NULL". All other code remains the same.

Jim

-----Original Message-----
From: Oleg Tkachenko [mailto:olegt@multiconn.com] 
Sent: Monday, February 03, 2003 4:12 PM
To: fop-user@xml.apache.org
Subject: Re: Block Problem

Jim Chundevalel wrote:

> 	I'm trying to generate an XSL:FO document on the fly by taking
> contents from an XML file. My XML file looks like this.
> 
> 
> <DATATEXT>
> 	<SECTIONS>
> 		<SECTION>
> 			<HEADING>Test One</HEADING>
> 			<MATTER>This is some text</MATTER>
> 		</SECTION>
> 		<SECTION>
> 			<HEADING>Test Two</HEADING>
> 			<MATTER>This is some other text</MATTER>
> 		</SECTION>		
> 	</SECTIONS>
> </DATATEXT>
> 
> I have an XSL FO Document that says
> 
> <xsl:for-each select="SECTIONS\SECTION">
> 	<fo:block>
> 		<fo:inline text-decoration="underline">
> 			<xsl:value-of select="HEADING"/>
> 		</fo:inline>
> 		<xsl:value-of select="MATTER"/>
> 	</fo:block>
> </xsl:for-each>
> 
> Now, I want to underline certain words contained in the MATTER Node.
For
> this, I was thinking of doing like this in the XML document.
> 
> <MATTER>
> 	This is some 
> 	<fo:inline text-decoration="underline">other</fo:inline>
> 	text.
> </MATTER>
> 
> (After referencing the fo namespace at the beginning of the XML
> document.)
> 
> However, the resulting PDF document does not underline the word
"other".
> How do I go about doing this?

Having fo in source xml sounds like a really bad idea, but anyway you 
should use xsl:copy-of, rather than xsl:value-of to copy source subtree.
<xsl:copy-of select="MATTER"/>

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Block Problem

Posted by Oleg Tkachenko <ol...@multiconn.com>.
Jim Chundevalel wrote:

> 	I'm trying to generate an XSL:FO document on the fly by taking
> contents from an XML file. My XML file looks like this.
> 
> 
> <DATATEXT>
> 	<SECTIONS>
> 		<SECTION>
> 			<HEADING>Test One</HEADING>
> 			<MATTER>This is some text</MATTER>
> 		</SECTION>
> 		<SECTION>
> 			<HEADING>Test Two</HEADING>
> 			<MATTER>This is some other text</MATTER>
> 		</SECTION>		
> 	</SECTIONS>
> </DATATEXT>
> 
> I have an XSL FO Document that says
> 
> <xsl:for-each select="SECTIONS\SECTION">
> 	<fo:block>
> 		<fo:inline text-decoration="underline">
> 			<xsl:value-of select="HEADING"/>
> 		</fo:inline>
> 		<xsl:value-of select="MATTER"/>
> 	</fo:block>
> </xsl:for-each>
> 
> Now, I want to underline certain words contained in the MATTER Node. For
> this, I was thinking of doing like this in the XML document.
> 
> <MATTER>
> 	This is some 
> 	<fo:inline text-decoration="underline">other</fo:inline>
> 	text.
> </MATTER>
> 
> (After referencing the fo namespace at the beginning of the XML
> document.)
> 
> However, the resulting PDF document does not underline the word "other".
> How do I go about doing this?

Having fo in source xml sounds like a really bad idea, but anyway you 
should use xsl:copy-of, rather than xsl:value-of to copy source subtree.
<xsl:copy-of select="MATTER"/>

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org