From: Atsushi Eno Date: Tue, 3 Aug 2004 06:51:00 +0000 (-0000) Subject: 2004-08-03 Atsushi Enomoto X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=665527a6822b42ff7b1adc5deff3b951f3d99ce6;p=mono.git 2004-08-03 Atsushi Enomoto * xml-classes : some updates on 2.0 stuff. svn path=/trunk/mono/; revision=31782 --- diff --git a/web/ChangeLog b/web/ChangeLog index 7c6b6524101..82918492839 100755 --- a/web/ChangeLog +++ b/web/ChangeLog @@ -1,3 +1,7 @@ +2004-08-03 Atsushi Enomoto + + * xml-classes : some updates on 2.0 stuff. + 2004-07-12 Atsushi Enomoto * xml-classes : oops, list styles. diff --git a/web/xml-classes b/web/xml-classes index cbeb84fdfd0..fdc224195bb 100755 --- a/web/xml-classes +++ b/web/xml-classes @@ -213,9 +213,7 @@ -** Plans - -*** System.Xml v2.0 +** System.Xml v2.0 Microsoft released the first public beta version of .NET Framework 2.0, available from MSDN. @@ -223,12 +221,12 @@ There are two assemblies related to System.Xml v2.0; System.Xml.dll and System.Data.SqlXml.dll. Most of the important part are in System.Xml.dll - (you will find that the core part of XQuery is in System.Xml.dll; see some - classes in MS.Internal.Xml namespace), so I'll still spot only on - System.Xml.dll. + (you will find that the core part of XQuery is in System.Xml.dll; For + example, see some classes in MS.Internal.Xml namespace), so I'll still + spot only on System.Xml.dll. - Note that .NET Framework is pre-release version so that they are subject - to change. + Note that .NET Framework is pre-release version, so they are subject + to change. Actually many of the pre-released classes vanished. System.Xml 2.0 contains several features such as: @@ -243,44 +241,106 @@ internal use -**** XmlReader.Create() and ReadValueAsXxx() +*** System.Xml 2.0 + +**** XmlReader/XmlWrier Factory methods In .NET 2.0, XmlTextReader, XmlNodeReader, XmlValidatingReader are obsolete and XmlReader.Create() is recommended (there is however no - alternative way to create XmlNodeReader). + alternative way to create XmlNodeReader). Similarly, there are + XmlWriter.Create() overloads. + + Currently, Microsoft's XmlWriter.Create() is unreliable and maybe there + will be changes. So basically XmlWriter.Create() is supposed to be done + after the next beta version of .NET 2.0. + + Some of XmlReader.Create() overloads are implemented, with limited + XmlReaderSettings support. + + +**** Typed XmlReader/XmlWriter - As for typed XmlReader support, we need something like XQueryConvert that - is like XmlConvert but based on XQuery 1.0 and XPath 2.0 data model. + In .NET 2.0, XmlReader is supposed to support strongly-typed data reading. + They are based on W3C "XML Schema Datatypes" Recommendation and "XQuery 1.0 + and XPath 2.0 Data Model" Working Draft. -**** XML Schema design changes + Some of XmlReader.ReadValueAsXxx() and XmlWriter.WriteValue() overloads are + implemented, though incompletely. They are based on internal XQueryConvert. + + +**** Sub-tree handling in XmlReader/XmlWriter/XPathNavigator + + Currently XmlReader.ReadSubtree(), XmlWriter.WriteSubtree() and + XPathNavigator.ReadSubtree() are implemented, though not so stable. + They are based on Mono.Xml.SubtreeXmlReader and + Mono.Xml.XPath.XPathNavigatorReader classes. + + +*** System.Xml.Schema 2.0 Since .NET 1.x is not so compliant with W3C XML Schema specification, Microsoft had to redesign System.Xml.Schema classes. We also have to - change some. + change many things. + + 1) It does not expose XmlSchemaDatatype (except for obsolete members). + Primitive types are represented as XmlSchemaSimpleType instances (thus + there are ElementSchemaType, AttributeSchemaType, BaseXmlSchemaType that + replace some existing properties). + + 2) "XQuery 1.0 and XPath 2.0 Data Model" datatypes (such as + xdt:dayTimeDuration) are newly supported. They are partially implemented + yet. + + 3) schema structures are now bound in parent-child relationship. It is + not yet implemented. With related to it, there seems bunch of schema + compilation bugfixes. + + 4) XmlSchemaCollection is not used anymore to represent effective set of + schemas. Instead, new XmlSchemaSet class is used. It should affect on + schema compilation design. In fact, I've implemented XmlSchemaCollection + as more conformant to W3C specification, but there are still many changes + required. + **** XSD Inference - In .NET 2.0, there is an XML Schema inference implementation. Once - XmlSchemaSet is implemented, it can be separately done by anyone. + In .NET 2.0, there is an XML Schema inference implementation. Now that + XmlSchemaSet is basically implemented, it can be separately done by anyone. Volunteer efforts are welcome here. -**** New XPathNavigator - System.Xml v2.0 implementation will be started from new XPathNavigator - implementation. First, its document structure and basic navigation feature - will be implemented. And next, XPath2 engine should be implemented - (XPathNavigator2 looks very different from XPathNavigator). +*** System.Xml.XPath 2.0 + +**** Editable XPathDocument + + in .NET 2.0 XPathDocument is supposed to be editable. Currently we provide + fast document table model based implementation (DTMXPathNavigator), but + by that design change, we (and they) cannot provide fast read only + XPathNavigator from XPathDocument anymore. - My current plan is to implement editable interface for XmlDocumentNavigator - (XPathNavigator from XmlDocument). Our XPathDocument is index-based - implementation, and thus it cannot be modified to be editable as it is. + Currently, new XPathDocument implementation is provided. The actual + implementation is Mono.Xml.XPath.XPathDocument2, that is simple dom-like + tree model. XPathDocument2 implements the same interfaces as XPathDocument + does. And XPathDocument delegates most of the methods to that class (for + example, XPathDocument.CreateEditor() calls XPathDocument2.CreateEditor()). - There are some trivial tasks such as schema validation (we have - - XPathDocumentReader that just wraps XPathNavigator, and our - XmlValidatingReader can accept any XmlReader). + Currently Mono.Xml.XPath.XPathDocument2 is unstable (it does not pass + the standalone XSLT tests as well as existing DTMXPathDocument does). So + it did not replace existing XPathDocument implementation, but you can use + new implementation by explicitly setting environment value + USE_XPATH_DOCUMENT_2 = yes. Currently it supports (well, is supposed + to support) basic editor feature such as AppendChild(). Other members + are untested (such as RejectChanges()). -**** XQuery 1.0 +**** extra stuff - XPathEditableDocument + + Currently we provide another IXPathEditable; XPathEditableDocument. That is + based on the idea that handles XmlDocument as editor target. It is + implemented as Mono.Xml.XPath.XPathEditableDocument. We might provide this + class as extra set (might be different mono-specific XML assembly). + + +**** System.Xml.XQuery and System.Xml.Xsl 2.0 XQuery is a new face XML data manipulation language (well, at least new face in .NET world). It is similar to SQL, but intended to manipulate and to @@ -288,17 +348,18 @@ such as XML Schema based datatypes. XQuery implementation can be found mainly in System.Xml.Query and - MS.Internal.Xml.Query namespaces. Note that they are in - System.Data.SqlXml.dll The implementation is mostly - in System.Xml.dll. + MS.Internal.Xml.Query namespaces. The implementation is mostly + in System.Xml.dll. System.Data.SqlXml.dll just invokes the actual XQuery + processor which resides in System.Xml.dll using reflection. XQuery implementation will be done in these steps:
    * XQuery syntax parser that parses xquery string to AST - (abstract syntax tree). + (abstract syntax tree). -> done. - * XQuery AST compiler into runnable query command (not done yet) + * XQuery AST compiler into runnable query command + (static context) * XQuery (dynamic context) runtime = XQuery expression evaluator + sequence iterator. @@ -309,7 +370,8 @@ * XQuery data model and (mainly) conversion support.
-**** Relax NG and DSDL in Mono 1.2 + +*** Relax NG and DSDL in Mono 1.2 Currently we support only RELAX NG as one part of ISO DSDL effort. There is existing Schematron implementation (NMatrix Project: @@ -367,5 +435,5 @@ Atsushi Eno - last updated 07/11/2004 + last updated 08/03/2004