On 9 June 2014 12:40, Guenter Milde <milde@users.sf.net> wrote:
>
> On 2014-06-03, engelbert gruber wrote:
>
> > [-- Type: text/plain, Encoding: 7bit --]
>
> > the erronous xml::
>
> >     <desc_signature class="" first="False" fullname="abs"
> >      ids="abs" module names="abs">
>
> > xml seams to require a value.
>
> > the code producing the error ::
>
> >     for name, value in self.attlist():
> >         if value is None: # boolean attribute
> >             parts.append(name)
> >             continue
>
> > to me None is not boolean, boolean is True/False or maybe 0/1
>
> However, I suppose the meaning of this comment refers to "switches", i.e.
> attributes/settings that are do not have a value but are in the
> ``attlist`` if True and absent if False.
>
> > to me "module" looks like yes it is a module
> > and "" like no it is not.
>
> > Having a value None says no value , therefore "module " seams
> > reasonable to me. If I want 'module=""' I would assign a value.
>
> As <tagname attrname> without an attribute value is forbidden in XML, we
> need a reasonable representation for this case. Candidates:
>
>
>   attrname="True"  this carries the message, that a switch is "on" if present
>                    in the attlist
>
>   attrname="None"  exact representation,
>
>   attrname=""      no value,
>
>                    are there cases where we need to distinguish from emty
>                    string as value?
>
>
> A boolean test of the value in Python, would however result in ``False``
> although the intention of a switch that is present in the attlist is ``True``.

so the fix would be in the xml-writer, because in html one might want
attributes without value, and it would be ```="True"```
for "None".

all the best

>
> Günter
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://www.hpccsystems.com
> _______________________________________________
> Docutils-develop mailing list
> Docutils-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/docutils-develop
>
> Please use "Reply All" to reply to the list.