Description of problem: Tcl's XML parser reports an error when an xml-stylesheet Processing Instruction is encountered in the parsed XML. Version-Release number of selected component (if applicable): RPM Package name tclxml Version = 3.1 How reproducible: everytime Steps to Reproduce: 1. Create Script: #!/usr/bin/tclsh package require xml proc OnXmlElementStart {args} {} proc OnXmlElementEnd {args} {} proc OnXmlCharacterData {args} {} set MyXml {<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" media="screen" href="http://feedproxy.google.com/~d/styles/rss2full.xsl"?> <rss> </rss> } set parser [::xml::parser -elementstartcommand OnXmlElementStart -elementendcommand OnXmlElementEnd -characterdatacommand OnXmlCharacterData] if [catch {$parser parse $MyXml} perr] { puts "Parse failed: $perr\n" } $parser free 2. Run That. Actual results: Parse failed: illegalcharacters {characters "xml" not permitted in processing instruction target "xml-stylesheet"} Expected results: No error messages. Additional info: I was able to fix this on my system by rolling back a somewhat recent change to sgmlparser.tcl: diff original_sgmlparser.tcl fixed_sgmlparser.tcl 609c609 < } elseif {[regexp {[xX][mM][lL]} $tag]} { --- > } elseif {[regexp {^[xX][mM][lL]$} $tag]} { I've submitted a comment to an up-stream bug report here: http://sourceforge.net/tracker/index.php?func=detail&aid=1649537&group_id=13178&atid=113178
Note an unfortunate "line wrap" on the statement that begins: set parser [::xml::parser .... ]
tclxml was released a few days ago, however it doesn't appear that this patch made it into the new release. I'm working on updating the fedora package to 3.2 and will include this patch with the updated package.
tclxml-3.1-14.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/tclxml-3.1-14.fc10
tclxml-3.2 has quite a few issues that need to be fixed before it can be updated in Fedora. In the meantime, I've fixed this specific problem for tclxml 3.1.
tclxml-3.1-14.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update tclxml'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2008-11595
tclxml-3.1-14.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.