Sorry that my answer may be pretty late wrt to what has been answered on the list, I'm a bit offline.

I think that your problem is not solvable "as is": SAX and DOM and any other XML parsing interfaces are lacking this notion of indicating that an attribute is actually only coming from the DTD hence should, if faithfulness is wished, not be re-output.

It would not be very hard to extend these technologies for this purpose and would even be probably easy to modify something like Saxon's AElfred... just... it's not there.

I would be very interested, for many other purposes, to get a grip on this information on Attribute objects, be them in SAX, dom4j, or JDOM.

Internet Explorer or any other application is, however, wrong to consider it different to have or not to have this attribute present... but that's another story.

paul


On 6-Apr-04, at 19:21 Uhr, Donald Ball wrote:


hey guys. i intended to send this to the dom4j users list but am unable to subscribe, sf is complaining about unroutable addresses. so apologies in advance if this is too off-topic.

i'm decorating some xhtml forms with dom4j. everything works great, with the exception of some failing xpath expressions which i've yet to develop a small unit test to demonstrate (but i will when i get a chance). anyway, my new problem is interesting. the output xhtml is adding attributes from the xhtml dtd, and is causing some layout grief in internet explorer (of course). specifically, all of my td elements are getting colspan="1" and rowspan="1" attributes, presumably because the dtd has this chunk:

<!ATTLIST td
  ...
  rowspan %Number; "1"
  colspan %Number; "1"
>

any ideas on how i can disable this behavior, short of hacking the dtd manually? I'm using a plain old XMLWriter instance with an OutputFormat set to XHTML true and encoding ISO-8859-1. thanks, and sorry again for the misplaced message.

- donald


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev



------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to