2004-03-17 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 17 Mar 2004 19:30:10 +0000 (19:30 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 17 Mar 2004 19:30:10 +0000 (19:30 -0000)
* Commons.Xml.Relaxng.dll.sources : Added RncParser.cs and RncTokenizer.cs.
* Commons.Xml.Relaxng_test.dll.sources : Added RncTests.cs.
* Makefile : Added RncParser.jay build support.
* README : updated.

svn path=/trunk/mcs/; revision=24243

mcs/class/Commons.Xml.Relaxng/ChangeLog
mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng.dll.sources
mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng_test.dll.sources
mcs/class/Commons.Xml.Relaxng/Makefile
mcs/class/Commons.Xml.Relaxng/README

index 9b248cde09d7421ecb2c8f1a7f7a2e6880fd3d71..019c30f13eed24b5c7e9b5aa08329faeb9d19486 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-17  Atsushi Enomoto <atsushi@ximian.com>
+
+       * Commons.Xml.Relaxng.dll.sources : Added RncParser.cs and RncTokenizer.cs.
+       * Commons.Xml.Relaxng_test.dll.sources : Added RncTests.cs.
+       * Makefile : Added RncParser.jay build support.
+       * README : updated.
+
 2004-03-01  Atsushi Enomoto <atsushi@ximian.com>
 
        * README : added usage descriptions.
index 83ee94f5af37d47d45498fd90e201e601c3eead3..2b3f2bee6bd6704b0c6f3858d48d4bfd9a35d99f 100644 (file)
@@ -17,3 +17,6 @@ Commons.Xml.Relaxng.Derivative/RdpNameClasses.cs
 Commons.Xml.Relaxng.Derivative/RdpObjects.cs
 Commons.Xml.Relaxng.Derivative/RdpPatterns.cs
 Commons.Xml.Relaxng.Derivative/Util.cs
+Commons.Xml.Relaxng.Rnc/RncParser.cs
+Commons.Xml.Relaxng.Rnc/RncTokenizer.cs
+
index bd9819c14187d1786a28acc8229cdaf20e39849d..6d93577a50d34e53572d920073c7ba20d663586d 100644 (file)
@@ -2,3 +2,4 @@ RdpPatternTests.cs
 RelaxngReaderTests.cs
 RelaxngValidatingReaderTests.cs
 XsdDatatypeTests.cs
+RncTests.cs
index b8d013c94d6d754b343079f462fa5b643c1f2f89..aeb59ca23b5fc986f0c9be7237c821de99716314 100644 (file)
@@ -17,3 +17,9 @@ EXTRA_DISTFILES = \
 
 
 include ../../build/library.make
+
+Commons.Xml.Relaxng.Rnc/RncParser.cs : Commons.Xml.Relaxng.Rnc/RncParser.jay
+       cd Commons.Xml.Relaxng.Rnc; \
+       jay -ctv < ../../../jay/skeleton.cs RncParser.jay > RncParser.cs; \
+       cd ..
+
index e7640dad4c9067fcf089ffafba665e16cb17af6b..b0c6da5eaddd1e6e3992caceca149964783db6e3 100755 (executable)
@@ -5,17 +5,45 @@
   RelaxngValidatingReader is an implementation to validate XML with RELAX NG\r
   grammar. You can use full standard grammar components with it.\r
 \r
-  Currently it supports only grammar xml syntax (in the future it will \r
-  support compact syntax).\r
+  Currently it supports both xml syntax and compact syntax.\r
 \r
   It supports RELAX NG predefined datatypes and XML Schema datatypes (its\r
   DatatypeLibrary is http://www.w3.org/2001/XMLSchema-datatypes ).\r
 \r
-  All classes which is expected to use are in namespace Commons.Xml.Relaxng.\r
+  All classes which is expected to use are in namespace Commons.Xml.Relaxng,\r
+  except for Commons.Xml.Relaxng.Rnc.RncParser class (which is used to parse\r
+  compact syntax).\r
   There is another namespace Commons.Xml.Relaxng.Derivative which is not\r
   expected to be used in users custom classes, though the classes are public\r
   as yet.\r
 \r
+\r
+** Grammar Object Model\r
+\r
+  RELAX NG grammar structure is represented in abstract RelaxngPattern class\r
+  and its derivations. The easiest way to get this instance is to use\r
+  static Read() method of RelaxngPattern class:\r
+\r
+       RelaxngPattern pattern = RelaxngPattern.Read (\r
+               new XmlTextReader ("relaxng.rng");\r
+\r
+  You can also use RelaxngPattern class to reuse grammar instance, as\r
+  already described (see Grammar Object Model).\r
+\r
+  And also, RelaxngGrammar and its contents can be created with managed code\r
+  like System.Xml.Schema.XmlSchema.\r
+\r
+\r
+** Compact Syntax Support\r
+\r
+  Commons.Xml.Relaxng.dll also supports RELAX NG Compact Syntax. To parse\r
+  compact syntax file, use Commons.Xml.Relaxng.Rnc.RncParser class:\r
+\r
+       RncParser parser = new RncParser (new NameTable ());\r
+       TextReader source = new StreamReader ("relaxng.rnc");\r
+       RelaxngGrammar grammar = parser.Parse (source);\r
+\r
+\r
 ** Validating Reader usage\r
 \r
   RelaxngValidatingReader is used to validate XML document with RELAX NG\r
        RelaxngValidatingReader reader = \r
                new RelaxngValidatingReader (instance, grammar);\r
 \r
-  You can also use RelaxngPattern class to reuse grammar instance:\r
-\r
-       RelaxngPattern pattern = RelaxngPattern.Read (\r
-               new XmlTextReader ("relaxng.rng");\r
-\r
-  And also, RelaxngGrammar and its contents can be created with managed code\r
-  like System.Xml.Schema.XmlSchema.\r
-\r
   Then Read() method (and other reading methods such as ReadElementString())\r
-  reads the instance, validating with the grammar.\r
+  reads the instance, validating with the supplied grammar.\r
 \r
 \r
 ** Datatype support\r
@@ -79,5 +99,5 @@
          not handle the same name define components properly.\r
        - Name class analysis and constraint check is not implemented (part\r
          of spec 7).\r
-       - Empty string won't be validated properly.\r
+       - Empty string might not be validated properly.\r
 \r