The fix for this is to not use "id". You should use an attribute named 
"id" only when you plan to assign a unique identifier to that attribute. 
Otherwise, lots of XML- and XSL-based systems (including but certainly not 
limited to FOP) will break. So, use some other name instead: "myid", 
"groupid", "tableid", "Oscar", whatever.

Jay Bryant
Bryant Communication Systems
(presently consulting at Synergistic Solution Technologies)




Thomas Winkler <[EMAIL PROTECTED]> 
10/13/2005 10:33 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
marking some elements by same @id






Hello,

I am designing a table with the trunk version of FOP.
The table must be configurable.


For example : it depends on the order if the
"Position" should appear or not.

So I created a xsl-fo stylesheet like this :


<fo:table ...>
<fo:table-column column-width="1.5cm"/>
<fo:table-column id="pos" column-width="2cm"/>
<fo:table-column column-width="2cm"/>

<fo:table-header>
<fo:table-row>

<fo:table-cell border-bottom="solid">
<fo:block>
Artikel
</fo:block>
</fo:table-cell>

<fo:table-cell id="pos"  border-bottom="solid">
<fo:block>
Position
</fo:block>
</fo:table-cell>

<fo:table-cell border-bottom="solid"> <fo:block>
Datum
</fo:block>
</fo:table-cell>

</fo:table-row>
</fo:table-header>

<fo:table-body>

<xsl:for-each select="Order">
<fo:table-row>

<fo:table-cell border-bottom="dotted">
<fo:block>
<xsl:value-of select="@name"/>
</fo:block>
</fo:table-cell>

<fo:table-cell id="Pos" border-bottom="dotted">
<fo:block>
<xsl:value-of select="@PosName"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-bottom="dotted">
<fo:block>
<xsl:value-of select="@date"/>
</fo:block>
</fo:table-cell>
...


If I want to remove the "Position", then the following
template did that for me :

<xsl:template match="//[EMAIL PROTECTED]'Pos']"/>

Luckily, Xalan does not complain about the non-unique
values of id.

However; if I want the "Position" in the table then
FOP will correctly complain "... id values must be
unique in document."

My question : is there any possibility to mark several
elements with the same attribute name so that I can
run such a "remove-template" ?

Or : how can I turn off the unique-id checking of FOP
? 


Thanks in advance !


Thomas





 






 

 
 
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier 
anmelden: http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to