Hello everyone
I poked around a lot and I guess I answered my own question. I thought I’d share it with you, in case it helps someone. Furthermore, if I am wrong about my assumption, you are more then welcome to correct me. I don’t claim to understand everything perfectly.
A complex element cannot really have a “value”.
You can force it to accept a “value” by using “mixed:true”. By doing that, you can have both subnodes and a textual value.
ex:
textual value, thanks to mixed:true
subnode-value
However, by doing this, you cannot declare a datatype for the textual value. This is, obviously a huge problem, and I think therefore that mixed:true should be used sparingly (for instance, if you want to have a node that contains a description (xhtml), and you don’t know how many subnodes and or text you will have).
On the other hand, “element with attributes” is great when the node you’re using is a leaf node and it will also have attributes. You can of course declare a datatype for the value of the node.
Lastly, if you want to have a node that has no subnodes, and has NO TEXTUAL VALUE of any sort, but you want it to have attributes (great for nodes that have attributes representing foreign keys), then I find using a complex element with attributes, and no subnodes and mixe:false is the best thing.
That way, the schema doesn’t allow any value for the node (just the attribs).
Any thoughts?
Peter Endisch
---------------------------------------
I’m a Zen Garden Maintenance Engineer
---------------------------------------
#API-Management#webMethods#Tamino