sxml
sxml copied to clipboard
XML tags not validated according to usual rules for NCName
Symbol to string conversion in srl:sxml->xml does not escape XML characters. Nor does string parsing in ssax:xml->sxml recognise escaped characters.
(require sxml)
(srl:sxml->xml '(number->string "2")) ;; '>' not escaped...
(ssax:xml->sxml (open-input-string (srl:sxml->xml '(number->string "2"))) null) ;; ... so this fails
(ssax:xml->sxml (open-input-string "<number->string>2</number->string>") null) ;; but this also fails
Interesting. Yes, it seems to me that sxml->xml should do validation of the NCName production given in https://www.w3.org/TR/REC-xml/#NT-Name . It seems like the kind of thing that Oleg would have gotten right, though, so I think I should do some digging before agreeing that this is a bug.
It seems like the kind of thing that Oleg would have gotten right
Yes
Should this at least be documented?