patch applied (packages/HaXml): In Xtract patterns,
downcase HTML only for tags+attrnames, not attrvals.
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Wed Jan 31 13:26:03 EST 2007
Wed Jan 31 10:15:04 PST 2007 Malcolm.Wallace at cs.york.ac.uk
* In Xtract patterns, downcase HTML only for tags+attrnames, not attrvals.
Although XML is case-sensitive, HTML is case-insensitive regarding
tagnames and attribute names. But of course the attribute *values* are
still case sensitive, so a blanket (map toLower) on pattern queries is
wrong. Here is an example of a document and query which previously
failed:
<a class="Foo">
Xtract "//a[@class='Foo']"
The solution is to fix the lexer to do downcasing (or more generally, any
transformation) on the appropriate tokens.
M ./src/Text/XML/HaXml/Xtract/Lex.hs -35 +39
M ./src/Text/XML/HaXml/Xtract/Parse.hs -6 +6
M ./src/tools/Xtract.hs -2 +2
M ./src/tools/XtractLazy.hs -2 +2
More information about the Cvs-libraries
mailing list