Attributes do not parse as CDATA???

Chris Marrin <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
If I make this XML:

     <emma version="abc < 123"> </emma>

Expat complains that the '<' in the string is illegal. Looking at the 
scanAtts() function it is clear why. When parsing the attribute value, 
it scans for '<' and '&', and of course the closing quote. In other 
words, it is parsing the attribute value. But according to the XML 1.0 spec:

     "All attributes for which no declaration has been read
      SHOULD be treated by a non-validating processor as if
      declared CDATA"

Now, I know that SHOULD does not mean MUST, but it seems that expat 
should at least be able to consider attributes as being CDATA. Yet I can 
see no way to disable to parsing of '<' and '&'.

Am I missing something, either in the way expat works, or in the XML spec?

-- 
chris marrin                ,""$,
[email protected]          b`    $                             ,,.
                         mP     b'                            , 1$'
         ,.`           ,b`    ,`                              :$$'
      ,|`             mP    ,`                                       ,mm
    ,b"              b"   ,`            ,mm      m$$    ,m         ,`P$$
   m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P       ,`  :$1
  b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$     .`    :$|
b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    :$$,..;"'     |$:
P$b,      _;b$$b$1"       |$$ ,`      ,$$"             ``'          $$
  ```"```'"    `"`         `""`        ""`                          ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.