Some further notes:

> First of all, I wonder why I get the warning without the --valid option.

This is because some ID checks are made regardless of the --valid option. Makes 
sense.

> Second, I can’t see why the id attribute would be already defined.

This is because an external entity is parsed using the original document as 
context doc:

    
https://git.gnome.org/browse/libxml2/tree/parser.c?id=33f658c969501bb246f8d4c6d21772948c7bc965#n12987

Then, when entities are replaced, the ID values have already been added to the 
doc. This should probably be fixed in libxml2 but I’m not sure what’s the best 
approach.

The other issue in the libxslt test suite is that the HTML docbook tests 
actually create documents with duplicate “name” attributes which are treated as 
IDs in HTML documents. This might be fixed in a newer version of docbook-xsl. 
But the easiest fix for now is to simply add the warning messages to the 
expected test output.

Nick

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to