The <xsl:copy-of> is way better.

If there is more than one attribute to copy you may do

<!DOCTYPE xsl:stylesheet [
  <!ENTITY common-attributes   "@class|@id|@align|@width|@height">
] >

and then

      <xsl:copy-of select="&common-attributes;"/>


You may also combine it with default values:
    <table class="figure">
      <!-- note that e.g. role="special-figure" gets transformed into
           class="special-figure" which in turn overwrites the default
           "figure" with the following copy-of -->
      <xsl:copy-of select="&common-attributes;"/>


Expect to see these in an updated sdocbook-plugin.

Cheers
Johannes


Ferdinand Soethe schrieb:
Thorsten Scherler wrote:
On Tue, 2008-02-12 at 19:52 +0000, [EMAIL PROTECTED] wrote:
> Author: ferdinand
> Date: Tue Feb 12 11:52:32 2008
> New Revision: 627063
>
> URL: http://svn.apache.org/viewvc?rev=627063&view=rev
> Log:
> Fixed problems of id-attributes not being copied in all elements and missing for reference.
>
> Modified:
> forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
>
> Modified: forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl > URL: http://svn.apache.org/viewvc/forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl?rev=627063&r1=627062&r2=627063&view=diff > ============================================================================== > --- forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl (original) > +++ forrest/branches/UpdateFOPto094/plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl Tue Feb 12 11:52:32 2008
> @@ -468,6 +468,7 @@
>      <xsl:template
>          match="notice">
>          <fo:block
> +            id="[EMAIL PROTECTED]"

The ugly side effect is that if no @id is present the above results in
<fo:block id="">

To prevent this you could do:
<fo:block>
<xsl:copy-of select="@id"/>


You do it later on in this commit:
...
> @@ -1000,16 +1011,10 @@
>          match="figure|img">
>          <fo:block
>              text-align="center">
> +            >              <xsl:call-template
>                  name="insertPageBreaks" />
> -            <xsl:if
> -                test="normalize-space(@id)!=''">
> -                <xsl:attribute
> -                    name="id">
> -                    <xsl:value-of
> -                        select="@id" />
> -                </xsl:attribute>
> -            </xsl:if>
> +            <xsl:copy-of select="@id"/>
>              <!-- Make relative paths absolute -->

I can remember that having empty @id had caused me some trouble in the
past.

salu2
Thanks Thorsten, I will fix that.

Best regards,
Ferdinand Soethe


--
User Interface Design GmbH, Ludwigsburg, Germany
Phone/Fax  +49 7141 37700-46/-99, Mobile +49 170 4914567
E-mail [EMAIL PROTECTED] * www.uidesign.de

Offices:
Martin-Luther-Straße 57-59, D-71636 Ludwigsburg
Truderinger Strasse 330, D-81825 Muenchen
Friedrichsring 46, D-68161 Mannheim
Hansastraße 7-11, 44137 Dortmund

Legal information according to EHUG:
User Interface Design GmbH; Managing Directors: Dr. Claus Goerner,
Franz Koller; Head office: Ludwigsburg; Commercial register of the
local court of Stuttgart, Germany, HRB 205519