Re: [xep-support] Element 'fo:external-graphic' and 'fo:page-number-citation' must be empty errors

From: Werner Donné <werner.donne@re.be>
Date: Tue Jun 28 2005 - 08:59:25 PDT

Hi Arian,

I would write the following:

<xsl:template match="image">
   <fo:external-graphic src="{concat('url(', @fileName, ')')}">
     <xsl:copy-of select="@border-style or @border-color or
       @border-width or @padding or @margin"/>
   </fo:external-graphic>
</xsl:template>

This should not add spaces. Spaces would have to be added with
the xsl:text element.

Regards,

Werner.

arian hojat wrote:
> hmmm how would i approach an xsl rule like this so it doesnt create the
> extra whitespace....
>
>
> <xsl:template match="image">
> <fo:external-graphic>
>
> <xsl:if test="@border-style"><xsl:attribute
> name="border-style"><xsl:value-of
> select="@border-style"/></xsl:attribute></xsl:if>
> <xsl:if test="@border-color"><xsl:attribute
> name="border-color"><xsl:value-of
> select="@border-color"/></xsl:attribute></xsl:if>
> <xsl:if test="@border-width"><xsl:attribute
> name="border-width"><xsl:value-of
> select="@border-width"/></xsl:attribute></xsl:if>
> <xsl:if test="@padding"><xsl:attribute name="padding"><xsl:value-of
> select="@padding"/></xsl:attribute></xsl:if>
> <xsl:if test="@margin"><xsl:attribute name="margin"><xsl:value-of
> select="@margin"/></xsl:attribute></xsl:if>
>
> <xsl:attribute name="src">url('<xsl:value-of
> select="@fileName"/>')</xsl:attribute>
>
> </fo:external-graphic>
> </xsl:template>
>
>
>
>
>
>
>
>
>
>
>> From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
>> Reply-To: xep-support@renderx.com
>> To: xep-support@renderx.com
>> Subject: Re: [xep-support] Element 'fo:external-graphic' and
>> 'fo:page-number-citation' must be empty errors
>> Date: Tue, 28 Jun 2005 10:09:59 -0400
>> MIME-Version: 1.0
>> Received: from mc5-f2.hotmail.com ([65.54.252.9]) by
>> imc1-s15.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 28 Jun
>> 2005 07:19:56 -0700
>> Received: from nfs04.RenderX.com ([64.124.45.238]) by
>> mc5-f2.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 28 Jun
>> 2005 07:19:55 -0700
>> Received: from nfs04.RenderX.com (localhost.RenderX.com [127.0.0.1])by
>> nfs04.RenderX.com (8.12.3/8.11.6) with ESMTP id j5SEcHNU040543for
>> <xep-support-secretword@nfs04.RenderX.com>; Tue, 28 Jun 2005 07:38:17
>> -0700 (PDT)(envelope-from owner-xep-support@renderx.com)
>> Received: (from majordom@localhost)by nfs04.RenderX.com
>> (8.12.3/8.12.3/Submit) id j5SEcHaw040542for xep-support-secretword;
>> Tue, 28 Jun 2005 07:38:17 -0700 (PDT)
>> X-Message-Info: yilqo4+6kc7P/PFuosFs0y/T7NwXQpaduYj2Xs6G1d0=
>> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2
>> References: <BAY102-F21A4011EA11F7B2990410FC2F60@phx.gbl>
>> <BAY102-F114BB1642A73AAE43C7BCEC2E10@phx.gbl>
>> X-Virus-Scanned: by amavisd-new
>> Precedence: bulk
>> List-Owner: <mailto:owner-xep-support@renderx.com>
>> List-Post: <mailto:xep-support@renderx.com>
>> List-Subscribe: <mailto:xep-support-request@renderx.com?body=subscribe>
>> List-Unsubscribe:
>> <mailto:xep-support-request@renderx.com?body=unsubscribe>
>> List-Archive: <http://xep.xattic.com/lists/xep-support/>
>> List-Help: <mailto:xep-support-request@renderx.com?body=help>
>> List-Id: <xep-support.renderx.com>
>> Return-Path: owner-majordomo@nfs04.RenderX.com
>> X-OriginalArrivalTime: 28 Jun 2005 14:19:55.0379 (UTC)
>> FILETIME=[74E80C30:01C57BEC]
>>
>> At 2005-06-28 09:17 -0400, arian hojat wrote:
>>
>>> i was evaluating XEP and the 1st transform i do, i get these errors...
>>>
>>> Element 'fo:external-graphic' must be empty.
>>> Element 'fo:page-number-citation' must be empty.
>>> Element 'fo:page-number-citation' must be empty.
>>> Element 'fo:page-number-citation' must be empty.
>>> Element 'fo:page-number-citation' must be empty.
>>> Element 'fo:page-number-citation' must be empty.
>>> Element 'fo:page-number-citation' must be empty.
>>> Element 'fo:page-number-citation' must be empty.
>>> .... many of these...
>>>
>>> I assume i am doing something wrong in my .fo?
>>
>>
>> Yes, the standard states those formatting objects must be empty, so
>> the tool is reporting that to you. Given that fo:external-graphic
>> gets its information from its attributes, why do you not use an empty
>> element? Also, given fo:page-number-citation gets its characters for
>> display from the formatting engine, it too has to be empty.
>>
>> I believe the message is quite clear and unequivocal.
>>
>> Note that:
>>
>> <fo:external-graphic ...attributes-here...>
>> </fo:external-graphic>
>>
>> is *not* an empty XML element because of the child text node.
>>
>>> FOP seems to be leniant though if i amdoing something wrong..
>>
>>
>> I must say that "lenient" is not an adjective I've heard before when
>> discussing the conformance issues with FOP.
>>
>> I hope this helps.
>>
>> . . . . . . . . . Ken
>>
>>
>> --
>> World-wide on-site corporate, govt. & user group XML/XSL training.
>> G. Ken Holman mailto:gkholman@CraneSoftwrights.com
>> Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
>> Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
>> Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
>> Legal business disclaimers: http://www.CraneSoftwrights.com/legal
>>
>> -------------------
>> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>> in the body of the message to majordomo@renderx.com from the address
>> you are subscribed from.
>> (*) By using the Service, you expressly agree to these Terms of
>> Service http://www.renderx.com/terms-of-service.html
>
>
>
> -------------------
> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
> in the body of the message to majordomo@renderx.com from the address
> you are subscribed from.
> (*) By using the Service, you expressly agree to these Terms of Service
> http://www.renderx.com/terms-of-service.html
>
>

-- 
Werner Donné  --  Re BVBA
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803	e-mail: werner.donne@re.be
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Tue Jun 28 09:22:15 2005

This archive was generated by hypermail 2.1.8 : Tue Jun 28 2005 - 09:22:16 PDT