|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] items as nodes or atomic valuesRonald Bourret rpbourret at rpbourret.comMon May 7 23:36:29 PDT 2007
I think this touches on something that took me years to understand, and that is that when you parse an XML document (or construct XML nodes with direct or indirect constructors), the result is *always* nodes and not atomic values, even if there is schema information present. For example, the result of parsing or constructing: <price>10</price> is always the node tree: Element node (name=price) | Text node (value=10) It is not: Element node (name=price) | Atomic value (type=string, value=10) and it is not (in the presence of schema information): Element node (name=price) | Atomic value (type=float, value=10.0) You can, of course, convert the various nodes into atomic values, such as through the string() or data() functions or through casting, but they start out as nodes. (Hopefully I've got this right. Please correct me if I don't...) -- Ron Smith, Donald T. wrote: > I do see from the example how nodes and (atomic) values interact, but it > seems to confirm my prior understanding of node trees since, in the > example given, the result of the @x expression is (first) a node whose > value is (then) atomized. So I'm still thinking initially of the node > tree and then about how a given node value is or is not atomized. What > I'm not tracking with is thinking of atomic values without, or apart > from, nodes.
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






