s-expression ::= atom | list
list ::= '(' (s-expression S)* ')'
atom ::= STRING | NUMBER | SYMBOL | quoted
STRING ::= '"' ([^"] | '\"')* '"'
NUMBER ::= ([+-])? [0-9]+ ('.')?
SYMBOL ::= (([a-zA-Z0-9-+=*/_~!@$%^&:<>{}]+) - NUMBER)
quoted ::= '(quote' s-expression ')'
| "'" s-expression
(document <pre-DTD> <DTD> <after-DTD>)means (for example) that a document information item is a list containing the literal keyword document, followed by pre-DTD material, the DTD, and after-DTD material. In actual examples, the syntactic variables pre-DTD, DTD, and after-DTD would be replaced, along with their angle brackets, by appropriate S-expressions.
(document <pre-DTD> <DTD> <after-DTD>)
(element <gi> <datatype> (<attributes>) (<children>))
("http://www.w3.org/2001/XMLSchema" . integer)
For compactness in the display, in most examples in this document I
use a symbol instead of a string containing the full URI, thus:
(xsd . integer)Readers concerned about this can imagine, if they will, that the symbol xsd is a variable name, and that this variable has as a value the string "http://www.w3.org/2001/XMLSchema". A top-level assignment like this[2] will do the trick:
(defconst xsd "http://www.w3.org/2001/XMLSchema" "The namespace name for the XSD namespace.")Or, in scheme:
;;; The symbol xsd denotes the namespace name for the XSD namespace. (define xsd "http://www.w3.org/2001/XMLSchema")
(element <gi> <datatype> (<attributes>) (<children>))
<?xml version="1.0"?>
<!--* This is a mildly augmented version of the XML Schema
* Primer's purchase-order example.
*-->
<!--* It was created by C. M. Sperberg-McQueen to illustrate the XML infoset.
* Revisions:
* 2001-07-30 : CMSMcQ : add some comments and processing instructions,
* to illustrate that bit.
*-->
<?demo-pi This is a demonstration PI at the top level. ?>
<po:purchaseOrder
orderDate="1999-10-20"
xmlns:="http://www.example.com/PO1"
xmlns:po="http://www.example.com/PO1">
<?my-app data for my app ?>
<po:shipTo country="US">
<name>Alice Smith</name>
<po:street>123 Maple Street</po:street>
<city>Mill Valley</city>
<po:state>CA</po:state>
<zip>90952</zip>
</po:shipTo>
<po:billTo country="US">
<name>Robert Smith</name>
<po:street>8 Oak Avenue</po:street>
<city>Old Town</city>
<po:state>PA</po:state>
<zip>95819</zip>
</po:billTo>
<po:comment>Hurry, my lawn is going wild!</po:comment>
<?my-app more data for my app ?>
<?other-app data for someone else's app ?>
<!--* N.B. using processing instructions this way may not be robust *-->
<po:items>
<po:item partNum="872-AA">
<po:productName>Lawnmower</po:productName>
<po:quantity>1</po:quantity>
<po:USPrice>148.95</po:USPrice>
<po:comment>Confirm this is electric</po:comment>
</po:item>
<po:item partNum="926-AA">
<po:productName>Baby Monitor</po:productName>
<po:quantity>1</po:quantity>
<po:USPrice>39.98</po:USPrice>
<po:shipDate>1999-05-21</po:shipDate>
</po:item>
</po:items>
</po:purchaseOrder>
;;; S-expressions in Augmented Amsler/Naggum Form
;;; generated by stylesheet xmlnag.xsl
(document () () (
(comment "* This is a mildly augmented version of the XML Schema
* Primer's purchase-order example.
*")
(comment "* It was created by C. M. Sperberg-McQueen to illustrate the XML infoset.
* Revisions:
* 2001-07-30 : CMSMcQ : add some comments and processing instructions,
* to illustrate that bit.
*")
(pi demo-pi This is a demonstration PI at the top level. )
(element po:purchaseOrder
(xsd . anyType)
((orderDate (xsd . anySimpleType) "1999-10-20") )
(
(pi my-app data for my app )
(element po:shipTo
(xsd . anyType)
((country (xsd . anySimpleType) "US") )
(
(element name (xsd . anyType) () ("Alice Smith"))
(element po:street (xsd . anyType) () ("123 Maple Street"))
(element city (xsd . anyType) () ("Mill Valley"))
(element po:state (xsd . anyType) () ("CA"))
(element zip (xsd . anyType) () ("90952"))
)) ; end po:shipTo
(element po:billTo
(xsd . anyType)
((country (xsd . anySimpleType) "US") )
(
(element name (xsd . anyType) () ("Robert Smith"))
(element po:street (xsd . anyType) () ("8 Oak Avenue"))
(element city (xsd . anyType) () ("Old Town"))
(element po:state (xsd . anyType) () ("PA"))
(element zip (xsd . anyType) () ("95819"))
)) ; end po:billTo
(element po:comment
(xsd . anyType)
()
("Hurry, my lawn is going wild!")) ; end po:comment
(pi my-app more data for my app )
(pi other-app data for someone else's app )
(comment "* N.B. using processing instructions this way may not be robust *")
(element po:items
(xsd . anyType)
()
(
(element po:item
(xsd . anyType)
((partNum (xsd . anySimpleType) "872-AA") )
(
(element po:productName (xsd . anyType) () ("Lawnmower"))
(element po:quantity (xsd . anyType) () ("1"))
(element po:USPrice (xsd . anyType) () ("148.95"))
(element po:comment (xsd . anyType) () ("Confirm this is electric"))
)) ; end po:item
(element po:item
(xsd . anyType)
((partNum (xsd . anySimpleType) "926-AA") )
(
(element po:productName (xsd . anyType) () ("Baby Monitor"))
(element po:quantity (xsd . anyType) () ("1"))
(element po:USPrice (xsd . anyType) () ("39.98"))
(element po:shipDate (xsd . anyType) () ("1999-05-21"))
)) ; end po:item
)) ; end po:items
)) ; end po:purchaseOrder
)) ; end document
;;; S-expressions in Augmented Amsler/Naggum Form
;;; generated by stylesheet xmlnag.xsl
;;; type information augmented / changed by hand
;;; insignificant whitespace deleted by hand
(document () () (
(comment "* This is a mildly augmented version of the XML Schema
* Primer's purchase-order example.
*")
(comment "* It was created by C. M. Sperberg-McQueen to illustrate the XML infoset.
* Revisions:
* 2001-07-30 : CMSMcQ : add some comments and processing instructions,
* to illustrate that bit.
*")
(pi demo-pi This is a demonstration PI at the top level. )
(element (po . purchaseOrder)
(po . purchaseOrderType)
((orderDate (xsd . date) "1999-10-20") )
(
(pi my-app data for my app )
(element (po . shipTo)
(po . USAddress)
((country (xsd . NMTOKEN) "US") )
(
(element (po . name) (xsd . string) () ("Alice Smith"))
(element (po . street) (xsd . string) () ("123 Maple Street"))
(element (po . city) (xsd . string) () ("Mill Valley"))
(element (po . state) (xsd . string) () ("CA"))
(element (po . zip) (xsd . decimal) () ("90952"))
)) ; end po:shipTo
(element (po . billTo)
(po . USAddress)
((country (xsd . NMTOKEN) "US") )
(
(element (po . name) (xsd . string) () ("Robert Smith"))
(element (po . street) (xsd . string) () ("8 Oak Avenue"))
(element (po . city) (xsd . string) () ("Old Town"))
(element (po . state) (xsd . string) () ("PA"))
(element (po . zip) (xsd . decimal) () ("95819"))
)) ; end po:billTo
(element (po . comment) (xsd . string) ()
("Hurry, my lawn is going wild!")) ; end po:comment
(pi my-app more data for my app )
(pi other-app data for someone else's app )
(comment "* N.B. using processing instructions this way may not be robust *")
(element (po . items) (po . Items) ()
(
(element (po . item)
(xsd . type-004)
((partNum (po . SKU) "872-AA") )
(
(element (po . productName) (xsd . string) () ("Lawnmower"))
(element (po . quantity) (xsd . type-005) () ("1"))
(element (po . USPrice) (xsd . decimal) () ("148.95"))
(element (po . comment) (xsd . string) () ("Confirm this is electric"))
)) ; end po:item
(element (po . item)
(xsd . type-004)
((partNum (xsd . SKU) "926-AA") )
(
(element (po . productName) (xsd . string) () ("Baby Monitor"))
(element (po . quantity) (xsd . type-005) () ("1"))
(element (po . USPrice) (xsd . decimal) () ("39.98"))
(element (po . shipDate) (xsd . string) () ("1999-05-21"))
)) ; end po:item
)) ; end po:items
)) ; end po:purchaseOrder
)) ; end document
(eii (
(namespace-name . "http://www.example.com/P01")
...
(children (
(pi ...)
(eii ...)
(eii ...)
)
...
))
Instead, we pull the children out (so we have a flat set of
information items, none nested within any other) and
use unique names to refer back and forth:(eii e-1 ( (namespace-name . "http://www.example.com/P01") ... (children (pi-1 e-2 e-3)) ... )) (pi pi-1 (... (parent e-1))) (eii e-2 (... (parent e-1))) (eii e-3 (... (parent e-1)))
(defconst mydoc '(document d-1 (...))) (get-property 'notations mydoc) ==> nil
(document document-node ( (children . ( comment-1 comment-2 pi-demo-pi-1 elem-1)) (document-element . elem-1) (notations . ()) (unparsed-entities . ()) (base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml") (standalone . ()) (version . ()) (all-declarations-processed . nil) )) ; end documentNote that since the standalone and version properties take Boolean and string values respectively, there is no ambiguity in explicitly representing their absence using nil.
(eii elem-1 ( (namespace-name . "http://www.example.com/PO1") (local-name . purchaseOrder) (prefix . po) ; omit this? (children . ( scii-1 pi-my-app-1 scii-2 elem-2 scii-14 elem-8 scii-26 elem-14 scii-28 pi-my-app-2 scii-29 pi-other-app-1 scii-30 comment-3 scii-31 elem-15 scii-53)) (attributes . ( elem-1@orderDate)) (namespace-attributes . ()) ; to be supplied by other means (in-scope-namespaces . ()) ; to be supplied by other means (base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml") (parent . document-node)))(This version was generated automatically and I haven't hand-edited the properties which cannot be generated using an XSLT stylesheet.)
(aii elem-1@orderDate ( (namespace-name . ()) (local-name . orderDate) (prefix . ()) (normalized-value . "1999-10-20") (specified . t) (attribute-type . unknown) (references . unknown) (owner-element . elem-1) ))
(sc-attribute
sca-039
((name . "lang")
(target-namespace "http://www.w3.org/1998/xml")
(type-definition ("http://www.w3.org/2001/XMLSchema" . language))
(scope . global)
(value-constraint nil)
(annotation .
(element xsd:annotation (xsd . anyType) ()
((documentation (xsd . anyType) ()
("In due course, we should install the relevant ISO 2-
and 3-letter codes as the enumerated possible values . . .")))))))
("<annotation>
<documentation>In due course, we should install the relevant ISO 2-
and 3-letter codes as the enumerated possible values . . .
</documentation>
</annotation>")
or as element and attribute information items. For now, I am using
the augmented Amsler/Naggum notation as a compromise between ease of
manipulation using Lisp (? but what am I planning to do with these?)
and compact representation. END NOTE.
(defun aii-locally-valid-p (aii attdecl)
(let* ((typedef (find-nun (get-property 'type-definition attdecl)))
(valcon (get-property 'valueconstraint attdecl))
(keyword (get-property 'keyword valcon))
(prelex (get-property 'value valcon))
(normlex (get-property 'normalized-value aii)))
(and
(not (eq attdecl nil))
(not (eq typedef nil))
(nv-locally-valid normlex typedef)
(if (eq keyword 'fixed)
(eq (map-to-value normlex typedef)
(map-to-value prelex typedef))))))
This code is used in < File xscomp.el 6 >
(defun aii-validity-assessed-p (aii)
(let ((attdecl (find-attdecl aii))
(typedef (find-nun (get-property 'type-definition attdecl))))
;; aii validity has been assessed iff three things are true:
(and
;; 1 we know an attribute declaration for it
(not (eq attdecl nil))
;; 2 we have tested its local validity and gotten a verdict
;; of true or false (so we wrap the test in this odd 'if')
(if (aii-locally-valid aii attdecl)
t
t)
;; 3 the test was made with a non-nil attribute declaration
;; (already tested) and non-nil type definition.
(not (eq typedef nil)))))
This code is used in < File xscomp.el 6 >
(defun find-attdecl (aii)
(or (find-context-determined-attdecl aii)
(find-qname-resolved-attdecl aii)))
This code is used in < File xscomp.el 6 > (defun aii-validity-strictly-assessed-p (aii) (aii-validity-assessed-p aii))This code is not used elsewhere.
(defun get-property (propname component) (cdr (assq propname (caddr component))))This code is used in < File xscomp.el 6 >
< Define aii-locally-valid-p 1 >This code is not used elsewhere.
< Define aii-validity-assessed-p 2 >
< Define find-attdecl 3 >
< Define get-property 5 >
Biron, Paul V., and Ashok Malhotra, ed. XML Schema Part 2: Datatypes. W3C Recommendation 2 May 2001. [Cambridge, Mass., Sophia-Antipolis, Tokyo]: W3C, 2001. http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/
Brown, Allen, Matthew Fuchs, Jonathan Robie, and Philip Wadler, ed. XML Schema: Formal Description. W3C Working Draft, 20 March 2001. [Cambridge, Mass., Sophia-Antipolis, Tokyo]: W3C, 2001. http://www.w3.org/TR/2001/WD-xmlschema-formal-20010320/
Chassell, Robert J. Programming in Emacs Lisp: An Introduction. Edition 1.04. Boston: Free Software Foundation, 1995. [Current version online at http://www.gnu.org/manual/emacs-lisp-intro/emacs-lisp-intro.html.]
Fallside, David, ed. XML Schema Part 0: Primer. W3C Recommendation 2 May 2001. [Cambridge, Mass., Sophia-Antipolis, Tokyo]: W3C, 2001. http://www.w3.org/TR/2001/REC-xmlschema-0-20010502/
Friedman, Daniel P., and Matthias Felleisen. The Little LISPer. Cambridge, Mass.: MIT Press, 1987.
Lewis, Bill, Dan LaLiberte, and the GNU Manual Group. The GNU Emacs Lisp Reference Manual. GNU Emacs Version 19.25 for Unix Users; Edition 2.3. Cambridge, Mass.: Free Software Foundation, 1994. 2 volumes, xx + 384, xx + 364 pp. [Current version online at http://www.gnu.org/manual/elisp-manual-20-2.5/elisp.html]
Thompson, Henry S., David Beech, Murray Maloney, and Noah Mendelsohn, ed. XML Schema Part 1: Structures. W3C Recommendation 2 May 2001. [Cambridge, Mass., Sophia-Antipolis, Tokyo]: W3C, 2001. http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/
;;; S-expressions in item-property Form
;;; generated by stylesheet xmliset.xsl
(document document-node (
(children . ( comment-1 comment-2 pi-demo-pi-1 elem-1))
(document-element . elem-1)
(notations . ())
(unparsed-entities . ())
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(standalone . ())
(version . ())
(all-declarations-processed . nil)
)) ; end document
(comment-ii comment-1 (
(content "* This is a mildly augmented version of the XML Schema
* Primer's purchase-order example.
*")
(parent . document-node)))
(comment-ii comment-2 (
(content "* It was created by C. M. Sperberg-McQueen to illustrate the XML infoset.
* Revisions:
* 2001-07-30 : CMSMcQ : add some comments and processing instructions,
* to illustrate that bit.
*")
(parent . document-node)))
(pi pi-demo-pi-1 (
(target . demo-pi)
(content . "This is a demonstration PI at the top level. ")
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(notation . unknown) ; to be supplied by other means
(parent . document-node)))
(eii elem-1 (
(namespace-name . "http://www.example.com/PO1")
(local-name . purchaseOrder)
(prefix . po) ; omit this?
(children . ( scii-1 pi-my-app-1 scii-2 elem-2 scii-14 elem-8
scii-26 elem-14 scii-28 pi-my-app-2 scii-29
pi-other-app-1 scii-30 comment-3 scii-31 elem-15 scii-53))
(attributes . ( elem-1@orderDate))
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . document-node)))
(aii elem-1@orderDate (
(namespace-name . "") ; N.B. the value "" may mean the name is unqualified.
(local-name . orderDate)
(prefix . ) ; omit this?
(normalized-value . "1999-10-20")
(specified . t)
(attribute-type . unknown) ; to be supplied by other means
(references . unknown) ; to be supplied by other means
(owner-element . elem-1)
))
(seq-cii scii-1 (
(character-codes "
")
(parent . elem-1)))
(pi pi-my-app-1 (
(target . my-app)
(content . "data for my app ")
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(notation . unknown) ; to be supplied by other means
(parent . elem-1)))
(seq-cii scii-2 (
(character-codes "
")
(parent . elem-1)))
(eii elem-2 (
(namespace-name . "http://www.example.com/PO1")
(local-name . shipTo)
(prefix . po) ; omit this?
(children . (scii-3 elem-3 scii-5 elem-4 scii-7 elem-5
scii-9 elem-6 scii-11 elem-7 scii-13))
(attributes . ( elem-2@country))
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-1)))
(aii elem-2@country (
(namespace-name . "") ; N.B. the value "" may mean the name is unqualified.
(local-name . country)
(prefix . ) ; omit this?
(normalized-value . "US")
(specified . t)
(attribute-type . unknown) ; to be supplied by other means
(references . unknown) ; to be supplied by other means
(owner-element . elem-2)
))
(seq-cii scii-3 (
(character-codes "
")
(parent . elem-2)))
(eii elem-3 (
(namespace-name . "http://www.example.com/PO1")
(local-name . name)
(prefix . ) ; omit this?
(children . ( scii-4))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-2)))
(seq-cii scii-4 (
(character-codes "Alice Smith")
(parent . elem-3)))
(seq-cii scii-5 (
(character-codes "
")
(parent . elem-2)))
(eii elem-4 (
(namespace-name . "http://www.example.com/PO1")
(local-name . street)
(prefix . po) ; omit this?
(children . ( scii-6))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-2)))
(seq-cii scii-6 (
(character-codes "123 Maple Street")
(parent . elem-4)))
(seq-cii scii-7 (
(character-codes "
")
(parent . elem-2)))
(eii elem-5 (
(namespace-name . "http://www.example.com/PO1")
(local-name . city)
(prefix . ) ; omit this?
(children . ( scii-8))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-2)))
(seq-cii scii-8 (
(character-codes "Mill Valley")
(parent . elem-5)))
(seq-cii scii-9 (
(character-codes "
")
(parent . elem-2)))
(eii elem-6 (
(namespace-name . "http://www.example.com/PO1")
(local-name . state)
(prefix . po) ; omit this?
(children . ( scii-10))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-2)))
(seq-cii scii-10 (
(character-codes "CA")
(parent . elem-6)))
(seq-cii scii-11 (
(character-codes "
")
(parent . elem-2)))
(eii elem-7 (
(namespace-name . "http://www.example.com/PO1")
(local-name . zip)
(prefix . ) ; omit this?
(children . ( scii-12))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-2)))
(seq-cii scii-12 (
(character-codes "90952")
(parent . elem-7)))
(seq-cii scii-13 (
(character-codes "
")
(parent . elem-2)))
(seq-cii scii-14 (
(character-codes "
")
(parent . elem-1)))
(eii elem-8 (
(namespace-name . "http://www.example.com/PO1")
(local-name . billTo)
(prefix . po) ; omit this?
(children . ( scii-15 elem-9 scii-17 elem-10 scii-19
elem-11 scii-21 elem-12 scii-23 elem-13 scii-25))
(attributes . ( elem-8@country))
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-1)))
(aii elem-8@country (
(namespace-name . "") ; N.B. the value "" may mean the name is unqualified.
(local-name . country)
(prefix . ) ; omit this?
(normalized-value . "US")
(specified . t)
(attribute-type . unknown) ; to be supplied by other means
(references . unknown) ; to be supplied by other means
(owner-element . elem-8)
))
(seq-cii scii-15 (
(character-codes "
")
(parent . elem-8)))
(eii elem-9 (
(namespace-name . "http://www.example.com/PO1")
(local-name . name)
(prefix . ) ; omit this?
(children . ( scii-16))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-8)))
(seq-cii scii-16 (
(character-codes "Robert Smith")
(parent . elem-9)))
(seq-cii scii-17 (
(character-codes "
")
(parent . elem-8)))
(eii elem-10 (
(namespace-name . "http://www.example.com/PO1")
(local-name . street)
(prefix . po) ; omit this?
(children . ( scii-18))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-8)))
(seq-cii scii-18 (
(character-codes "8 Oak Avenue")
(parent . elem-10)))
(seq-cii scii-19 (
(character-codes "
")
(parent . elem-8)))
(eii elem-11 (
(namespace-name . "http://www.example.com/PO1")
(local-name . city)
(prefix . ) ; omit this?
(children . ( scii-20))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-8)))
(seq-cii scii-20 (
(character-codes "Old Town")
(parent . elem-11)))
(seq-cii scii-21 (
(character-codes "
")
(parent . elem-8)))
(eii elem-12 (
(namespace-name . "http://www.example.com/PO1")
(local-name . state)
(prefix . po) ; omit this?
(children . ( scii-22))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-8)))
(seq-cii scii-22 (
(character-codes "PA")
(parent . elem-12)))
(seq-cii scii-23 (
(character-codes "
")
(parent . elem-8)))
(eii elem-13 (
(namespace-name . "http://www.example.com/PO1")
(local-name . zip)
(prefix . ) ; omit this?
(children . ( scii-24))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-8)))
(seq-cii scii-24 (
(character-codes "95819")
(parent . elem-13)))
(seq-cii scii-25 (
(character-codes "
")
(parent . elem-8)))
(seq-cii scii-26 (
(character-codes "
")
(parent . elem-1)))
(eii elem-14 (
(namespace-name . "http://www.example.com/PO1")
(local-name . comment)
(prefix . po) ; omit this?
(children . ( scii-27))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-1)))
(seq-cii scii-27 (
(character-codes "Hurry, my lawn is going wild!")
(parent . elem-14)))
(seq-cii scii-28 (
(character-codes "
")
(parent . elem-1)))
(pi pi-my-app-2 (
(target . my-app)
(content . "more data for my app ")
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(notation . unknown) ; to be supplied by other means
(parent . elem-1)))
(seq-cii scii-29 (
(character-codes "
")
(parent . elem-1)))
(pi pi-other-app-1 (
(target . other-app)
(content . "data for someone else's app ")
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(notation . unknown) ; to be supplied by other means
(parent . elem-1)))
(seq-cii scii-30 (
(character-codes "
")
(parent . elem-1)))
(comment-ii comment-3 (
(content "* N.B. using processing instructions this way may not be robust *")
(parent . elem-1)))
(seq-cii scii-31 (
(character-codes "
")
(parent . elem-1)))
(eii elem-15 (
(namespace-name . "http://www.example.com/PO1")
(local-name . items)
(prefix . po) ; omit this?
(children . ( scii-32 elem-16 scii-42 elem-21 scii-52))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-1)))
(seq-cii scii-32 (
(character-codes "
")
(parent . elem-15)))
(eii elem-16 (
(namespace-name . "http://www.example.com/PO1")
(local-name . item)
(prefix . po) ; omit this?
(children . ( scii-33 elem-17 scii-35 elem-18 scii-37 elem-19 scii-39 elem-20 scii-41))
(attributes . ( elem-16@partNum))
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-15)))
(aii elem-16@partNum (
(namespace-name . "") ; N.B. the value "" may mean the name is unqualified.
(local-name . partNum)
(prefix . ) ; omit this?
(normalized-value . "872-AA")
(specified . t)
(attribute-type . unknown) ; to be supplied by other means
(references . unknown) ; to be supplied by other means
(owner-element . elem-16)
))
(seq-cii scii-33 (
(character-codes "
")
(parent . elem-16)))
(eii elem-17 (
(namespace-name . "http://www.example.com/PO1")
(local-name . productName)
(prefix . po) ; omit this?
(children . ( scii-34))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-16)))
(seq-cii scii-34 (
(character-codes "Lawnmower")
(parent . elem-17)))
(seq-cii scii-35 (
(character-codes "
")
(parent . elem-16)))
(eii elem-18 (
(namespace-name . "http://www.example.com/PO1")
(local-name . quantity)
(prefix . po) ; omit this?
(children . ( scii-36))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-16)))
(seq-cii scii-36 (
(character-codes "1")
(parent . elem-18)))
(seq-cii scii-37 (
(character-codes "
")
(parent . elem-16)))
(eii elem-19 (
(namespace-name . "http://www.example.com/PO1")
(local-name . USPrice)
(prefix . po) ; omit this?
(children . ( scii-38))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-16)))
(seq-cii scii-38 (
(character-codes "148.95")
(parent . elem-19)))
(seq-cii scii-39 (
(character-codes "
")
(parent . elem-16)))
(eii elem-20 (
(namespace-name . "http://www.example.com/PO1")
(local-name . comment)
(prefix . po) ; omit this?
(children . ( scii-40))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-16)))
(seq-cii scii-40 (
(character-codes "Confirm this is electric")
(parent . elem-20)))
(seq-cii scii-41 (
(character-codes "
")
(parent . elem-16)))
(seq-cii scii-42 (
(character-codes "
")
(parent . elem-15)))
(eii elem-21 (
(namespace-name . "http://www.example.com/PO1")
(local-name . item)
(prefix . po) ; omit this?
(children . ( scii-43 elem-22 scii-45 elem-23 scii-47 elem-24 scii-49 elem-25 scii-51))
(attributes . ( elem-21@partNum))
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-15)))
(aii elem-21@partNum (
(namespace-name . "") ; N.B. the value "" may mean the name is unqualified.
(local-name . partNum)
(prefix . ) ; omit this?
(normalized-value . "926-AA")
(specified . t)
(attribute-type . unknown) ; to be supplied by other means
(references . unknown) ; to be supplied by other means
(owner-element . elem-21)
))
(seq-cii scii-43 (
(character-codes "
")
(parent . elem-21)))
(eii elem-22 (
(namespace-name . "http://www.example.com/PO1")
(local-name . productName)
(prefix . po) ; omit this?
(children . ( scii-44))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-21)))
(seq-cii scii-44 (
(character-codes "Baby Monitor")
(parent . elem-22)))
(seq-cii scii-45 (
(character-codes "
")
(parent . elem-21)))
(eii elem-23 (
(namespace-name . "http://www.example.com/PO1")
(local-name . quantity)
(prefix . po) ; omit this?
(children . ( scii-46))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-21)))
(seq-cii scii-46 (
(character-codes "1")
(parent . elem-23)))
(seq-cii scii-47 (
(character-codes "
")
(parent . elem-21)))
(eii elem-24 (
(namespace-name . "http://www.example.com/PO1")
(local-name . USPrice)
(prefix . po) ; omit this?
(children . ( scii-48))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-21)))
(seq-cii scii-48 (
(character-codes "39.98")
(parent . elem-24)))
(seq-cii scii-49 (
(character-codes "
")
(parent . elem-21)))
(eii elem-25 (
(namespace-name . "http://www.example.com/PO1")
(local-name . shipDate)
(prefix . po) ; omit this?
(children . ( scii-50))
(attributes . ())
(namespace-attributes . ()) ; to be supplied by other means
(in-scope-namespaces . ()) ; to be supplied by other means
(base-URI . "file:/d:/home/cmsmcq/2001/schema/potest.xml")
(parent . elem-21)))
(seq-cii scii-50 (
(character-codes "1999-05-21")
(parent . elem-25)))
(seq-cii scii-51 (
(character-codes "
")
(parent . elem-21)))
(seq-cii scii-52 (
(character-codes "
")
(parent . elem-15)))
(seq-cii scii-53 (
(character-codes "
")
(parent . elem-1)))
(defconst xsd '((xsd . anyURI) "http://www.w3.org/2001/XMLSchema") "The namespace name for the XSD namespace.")
(progn (aii-locally-valid-p aii attdecl) t)— but I suspect the if is clearer to most.