OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Formatting all instances of profiling text inred


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On 07/21/2010 09:45 PM, Steve Johnson wrote:

Hi Steve,


> Thanks to Tom for pointing me in the right direction but it has exposed 
> another problem.
> 
> Here are the blocs I added to our custom FO template:
> 
>        <xsl:template match="phrase[@condition='draft']">
>           <fo:inline color="red">
>           <xsl:apply-templates/>
>           </fo:inline>
>        </xsl:template>
> 
>       <xsl:template match="para[@condition='draft']">
>                <fo:inline color="red">
>                <xsl:apply-templates/>
>                </fo:inline>
>       </xsl:template>
> 
> In some documents *but not all*, when I process via FOP, I get an exception:
> 
> org.apache.fop.fo.ValidationException: Error(Unknown location): 
> fo:inline is not a valid child element of fo:flow.
> 
> The entire exception is huge but that is the root cause. In one case I 
> can generate a PDF if I have no <para condition="draft"> elements, and 
> I'm still investigating.
> 
> Can someone point me in a direction as to a cause?

If I see this correctly, the reason is as follows:

You can not use fo:inline on a para, which is rendered as a fo:block ...
so if you were to write the following, things should work:

        <xsl:template match="phrase[@condition='draft']">
           <fo:inline color="red">
           <xsl:apply-templates/>
           </fo:inline>
        </xsl:template>

       <xsl:template match="para[@condition='draft']">
                <fo:block color="red">
                <xsl:apply-templates/>
                </fo:block>
       </xsl:template>



	Juri
- -- 
If I'm over the hill, why is it I don't recall ever being on top?
		-- Jerry Muscha
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEAREDAAYFAkxHUEUACgkQeKE9NrxdrXx/DQCcDTq6yLcI8MCDIapvRaovsZKs
vuAAmwUWWySZ0pRbp4MhD7ZqcD3RXPdf
=xa+K
-----END PGP SIGNATURE-----


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]