emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/nxml/rng-xsd.el,v


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/nxml/rng-xsd.el,v
Date: Thu, 03 Jul 2008 12:25:30 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      08/07/03 12:25:23

Index: nxml/rng-xsd.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/nxml/rng-xsd.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- nxml/rng-xsd.el     6 May 2008 04:25:58 -0000       1.5
+++ nxml/rng-xsd.el     3 Jul 2008 12:25:22 -0000       1.6
@@ -46,21 +46,22 @@
 
 ;;;###autoload
 (defun rng-xsd-compile (name params)
-  "Provides W3C XML Schema as a RELAX NG datatypes library. NAME is a
-symbol giving the local name of the datatype.  PARAMS is a list of
-pairs (PARAM-NAME . PARAM-VALUE) where PARAM-NAME is a symbol giving
-the name of the parameter and PARAM-VALUE is a string giving its
-value.  If NAME or PARAMS are invalid, it calls rng-dt-error passing
-it arguments in the same style as format; the value from rng-dt-error
-will be returned.  Otherwise, it returns a list.  The first member of
-the list is t if any string is a legal value for the datatype and nil
-otherwise.  The second argument is a symbol; this symbol will be
-called as a function passing it a string followed by the remaining
-members of the list.  The function must return an object representing
-the value of the datatype that was represented by the string, or nil
-if the string is not a representation of any value. The object
-returned can be any convenient non-nil value, provided that, if two
-strings represent the same value, the returned objects must be equal."
+  "Provides W3C XML Schema as a RELAX NG datatypes library.
+NAME is a symbol giving the local name of the datatype.  PARAMS is a
+list of pairs (PARAM-NAME . PARAM-VALUE) where PARAM-NAME is a symbol
+giving the name of the parameter and PARAM-VALUE is a string giving
+its value.  If NAME or PARAMS are invalid, it calls rng-dt-error
+passing it arguments in the same style as format; the value from
+rng-dt-error will be returned.  Otherwise, it returns a list.  The
+first member of the list is t if any string is a legal value for the
+datatype and nil otherwise.  The second argument is a symbol; this
+symbol will be called as a function passing it a string followed by
+the remaining members of the list.  The function must return an object
+representing the value of the datatype that was represented by the
+string, or nil if the string is not a representation of any value.
+The object returned can be any convenient non-nil value, provided
+that, if two strings represent the same value, the returned objects
+must be equal."
   (let ((convert (get name 'rng-xsd-convert)))
     (if (not convert)
        (rng-dt-error "There is no XSD datatype named %s" name)
@@ -246,10 +247,10 @@
        (if (match-beginning 1) 'true 'false)))
 
 (defun rng-xsd-convert-decimal (string)
-  "Convert a string representing a decimal to an object representing
-its values.  A decimal value is represented by a vector [SIGN
-INTEGER-DIGITS FRACTION-DIGITS] where SIGN is 1 or -1, INTEGER-DIGITS
-is a string containing zero or more digits, with no leading zero, and
+  "Convert a string representing a decimal to an object representing it values.
+A decimal value is represented by a vector [SIGN INTEGER-DIGITS
+FRACTION-DIGITS] where SIGN is 1 or -1, INTEGER-DIGITS is a string
+containing zero or more digits, with no leading zero, and
 FRACTION-DIGITS is a string containing zero or more digits with no
 trailing digits.  For example, -0021.0430 would be represented by [-1
 \"21\" \"043\"]."
@@ -365,9 +366,9 @@
        string))
 
 (defun rng-xsd-make-date-time-regexp (template)
-  "Returns a regular expression matching a ISO 8601 date/time. The
-template is a string with Y standing for years field, M standing for
-months, D standing for day of month, T standing for a literal T, t
+  "Returns a regular expression matching a ISO 8601 date/time.
+The template is a string with Y standing for years field, M standing
+for months, D standing for day of month, T standing for a literal T, t
 standing for time and - standing for a literal hyphen.  A time zone is
 always allowed at the end. Regardless of the fields appearing in the
 template, the regular expression will have twelve groups matching the
@@ -435,14 +436,14 @@
     v))
           
 (defun rng-xsd-convert-date-time (string regexp)
-  "Converts an XML Schema date/time to a list.  Returns nil if
-invalid.  REGEXP is a regexp for parsing the date time as returned by
-`rng-xsd-make-date-time-regexp'. The list has 4 members (HAS-TIME-ZONE
-DAY SECOND SECOND-FRACTION), where HAS-TIME-ZONE is t or nil depending
-on whether a time zone was specified, DAY is an integer giving a day
-number (with Jan 1 1AD being day 1), SECOND is the second within that
-day, and SECOND-FRACTION is a float giving the fractional part of the
-second."
+  "Converts an XML Schema date/time to a list.
+Returns nil if invalid.  REGEXP is a regexp for parsing the date time
+as returned by `rng-xsd-make-date-time-regexp'.  The list has 4 members
+\(HAS-TIME-ZONE DAY SECOND SECOND-FRACTION), where HAS-TIME-ZONE is t
+or nil depending on whether a time zone was specified, DAY is an
+integer giving a day number (with Jan 1 1AD being day 1), SECOND is the
+second within that day, and SECOND-FRACTION is a float giving the
+fractional part of the second."
   (and (string-match regexp string)
        (let ((year-sign (match-string 1 string))
             (year (match-string 2 string))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]