Re: [xslt] Transformation result DOM document does not honor xml:id



Daniel Veillard schrieb:
On Mon, Apr 06, 2009 at 04:03:09PM +0200, Michael Ludwig wrote:
The result DOM document of a transformation does not honor the
automatic ID-ness of an xml:id attribute.

  Hum ... that's I think a bug in libxslt (or possibly libxml2 when
the attribute is added). I must admit xml:id was more though in the
context of a parser while here the document is generated by creating
the tree/DOM, still I think this should be fixed.

 I think I found the fix, due to an optimization in libxslt which
broke the ID tagging of the attribute when generated. See attached
patch

Hi Daniel,

thanks for looking into this. I applied your patch and repeated the
tests; it's still not 100 % correct. The ID-ness seems to be honored
only for attributes constructed using the <xsl:attribute> instruction,
not for attributes appearing in literal XML. You can use the Perl and
PHP tests I supplied to verify this.

Regards,

Michael Ludwig


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]