You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jay Di Silvestri <ja...@softquad.com> on 2001/05/26 20:06:15 UTC

PropertyMapping?

I'm trying suppress the printing of some text based on a conditional, so I'm
goofing around with the source to try that.  I added  a line to
FOPropertyMapping.java :
    s_htGeneric.put("sq", SoftQuadMaker.maker("sq"));
and I created a SoftQuad.java file and SoftQuadMaker.java file that seem to
executeing. 
The parser now seems to accept this syntax <fo:inline sq=hidden . . .

I want to test for this property at the render stage.  How do I do that?

Jay Di Silvestri
Director of Business Development,
Content Services Group
SoftQuad
1310 Redwood Way, Suite 120
Petaluma, CA 94954
(800) 932-7404
jay@softquad.com 



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


Re: PropertyMapping?

Posted by Ar...@chebucto.ns.ca.
Hi, Jay

If the property on the FO has become a trait on the area(s), then it will be
available in the corresponding render* method. The solution here is to make sure
you place a trait on the area(s) in question.

You will want to capture the 'sq' property in the Inline constructor. Then, when
addCharacters(0 is called with text to create a new FOText, you want to pass
that to each affected FOText. Likely with a setter that you add to FOText, which
will also have this property defined (as a class, that is, not as an FO).

At layout time, you want to pass the state of the 'sq' property in FOText into
the current LineArea, probably as an extra parameter to addText() on LineArea.
LineArea can use that in its addText() method to suitably set a trait on each
affected WordArea.

What you end up with are WordAreas, being passed to renderWordArea, that can be
tested to see of they have this 'sq' trait set or cleared.

Hope this makes sense. You're talking about some extra simple methods and
instance variables, likely less than an hour's worth of coding and testing.

Regards,
Arved Sandstrom

Quoting Jay Di Silvestri <ja...@softquad.com>:

> I'm trying suppress the printing of some text based on a conditional, so
> I'm
> goofing around with the source to try that.  I added  a line to
> FOPropertyMapping.java :
>     s_htGeneric.put("sq", SoftQuadMaker.maker("sq"));
> and I created a SoftQuad.java file and SoftQuadMaker.java file that seem to
> executeing. 
> The parser now seems to accept this syntax <fo:inline sq=hidden . . .
> 
> I want to test for this property at the render stage.  How do I do that?
> 
> Jay Di Silvestri
> Director of Business Development,
> Content Services Group
> SoftQuad
> 1310 Redwood Way, Suite 120
> Petaluma, CA 94954
> (800) 932-7404
> jay@softquad.com 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org
> 


---------------------------------------------------------------
 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: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org