Thread: [Saxdotnet-devel] Discussion status
Brought to you by:
jeffrafter,
kwaclaw
From: Karl W. <ka...@wa...> - 2004-12-10 01:49:04
|
Just a brief review of the current status for the various threads: (only 3 participants so far) A) "Unifying" the core and extension interfaces: No opposition, seems accepted. B) Changing Exceptions in the API Issue around SaxNotSupportedException vs. built in NotSupportedException C) Reducing the versioning / eliminating the Ixxx2 interfaces It seems there is no opposition to the actual proposal, but there are a few details to consider: - Should we remove the IsDeclared mtehod from ILocator and replace it with returning "UNDECLARED" from GetType() - Should GetType() potentially differentiate between "NMTOKEN" and and enumeration? Choices: return "ENUMERATION" or the actual list of values. Question: What is GetType() actually useful for? D) Requiring EndDocument Jeff and I differ in one point: if EndDocument() should be called when IXmlReader.Parse() throws an exception (originating from the parser or a call-back). No feedback yet. E) StartElement, when URI is not present The basic question is, do we indicate the absence of a namespace by returning uri = "" or uri = null? So far, there is a 2:1 vote for uri = "". For matters of consistence the same approach (indicating absence of a string value) should be used throughout, so also for the arguments in Start/EndPrefixMapping(). F) Merging the IXmlReaderControl with IXmlReader Some opposition from Elliotte, that is, 2:1 in favour of adding Suspend/Resume() to IXmlReader. G) SAX holes - Max string length: String.Length is defined as int, not much we can do here. - Skipped entities in attribute values: possibility of marking spot in attribute value (at user option). H) Replace is-standalone feature with ILocator member No discussion yet (but off-list agreement between Jeff and Karl). As far as the current source and documentation is concerned, A, F, H are implemented, some of C is done (except for open issues). D and E are documented along Karl's line of thinking, B is partially implemented by removing SaxArgumentException, G is unresolved. Karl |
From: Elliotte H. <el...@me...> - 2004-12-10 11:51:43
|
Karl Waclawek wrote: > - Should GetType() potentially differentiate between "NMTOKEN" > and and enumeration? Choices: return "ENUMERATION" or the > actual list of values. One more note on this: The XML Infoset spec states: # [attribute type] An indication of the type declared for this attribute in the DTD. Legitimate values are ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS, NOTATION, CDATA, and ENUMERATION. If there is no declaration for the attribute, this property has no value. If no declaration has been read, but the [all declarations processed] property of the document information item is false (so there may be an unread declaration), then the value of this property is unknown. Applications should treat no value and unknown as equivalent to a value of CDATA. The value of this property is not affected by the validity of the attribute value. So it does distinguish between ENUMERATION and NMTOKEN. > Question: What is GetType() actually useful for? It is important to know which attributes have ID, IDREF, and IDREFS types. That has a lot of practical implication for XPath, XPointer, and other applications. ENTITY, ENTITIES, and NOTATION are also practically important in the rare use cases where someone is using unparsed entities and notations. For serialization it's sometimes useful to know whether an attribute has type CDATA or not, to support proper round-tripping. However, the distinction between ENUMERATION and NMTOKEN is pretty minimal and somewhat tautological. For instance, you need it to make XInclude work, because XInclude is defined in terms of the Infoset, but the practical impact is pretty small. I can imagine it might be useful if you were trying to derive a DTD from an instance document. -- Elliotte Rusty Harold el...@me... XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.org/books/xian3/ http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim |
From: Karl W. <ka...@wa...> - 2004-12-10 14:05:45
|
Elliotte Harold wrote: > Karl Waclawek wrote: > > >> - Should GetType() potentially differentiate between "NMTOKEN" >> and and enumeration? Choices: return "ENUMERATION" or the >> actual list of values. > > > > One more note on this: The XML Infoset spec states: > > # [attribute type] An indication of the type declared for this attribute > in the DTD. Legitimate values are ID, IDREF, IDREFS, ENTITY, ENTITIES, > NMTOKEN, NMTOKENS, NOTATION, CDATA, and ENUMERATION. If there is no > declaration for the attribute, this property has no value. If no > declaration has been read, but the [all declarations processed] property > of the document information item is false (so there may be an unread > declaration), then the value of this property is unknown. Applications > should treat no value and unknown as equivalent to a value of CDATA. The > value of this property is not affected by the validity of the attribute > value. > > So it does distinguish between ENUMERATION and NMTOKEN. Now I remember. Goin back to my source in SAXExpat, there is actually a comment about the Infoset, and that is why SAXExpat returns "NUMERATION". So, my suggestion is: "ENUMERATION", to bein line with the Infoset. > > >> Question: What is GetType() actually useful for? > Thanks for the clarification. One administrative question: I don't seem to get list mesages anymore, except when cc'ed to me. Are you experiencing the same? Did you get the "IsStandlone feature" related nessage? Karl |
From: Elliotte H. <el...@me...> - 2004-12-10 14:58:17
|
Karl Waclawek wrote: > I don't seem to get list mesages anymore, except when cc'ed to me. > Are you experiencing the same? Did you get the "IsStandlone feature" > related nessage? I'm not sure off the top of my head, but I am getting duplicates of most messages, which suggests I'm getting them personally and through the list. -- Elliotte Rusty Harold el...@me... XML in a Nutshell 3rd Edition Just Published! http://www.cafeconleche.org/books/xian3/ http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim |