|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath: how to select based on element type?
Hi,
I am fairly new to XPath and XML schema.
I have a couple of newbie questions:
(1) Is there a way a in XPath to select nodes based on their element type?
(2) My second question is on the proper use of XML schema:
Say, we are modeling a line segment in geometry.
To give an example, should it look like
(a)
<Line>
<Point>
<Number>0</Number>
<Number>0</Number>
</Point>
<Point>
<Number>3</Number>
<Number>3</Number>
</Point>
</Line>
or
(b)
<Line>
<a>
<x>0</x>
<y>0</y>
</a>
<b>
<x>0</x>
<y>0</y>
</b>
</Line>
with a and b being of type Point (specified in a scheme definition) and
x and y of some appropriate simple type.
If we are following an approach as that in (b), how do we represent
sequences of arbitrary length -- e.g., a polyline figure.
If one is following an approach as that in (a), how are scheme types
helpful? Should one have elements corresponding to each schema type?
Regards
Sankar
--
Sankaranarayanan K. V. | sankar@m...
Motorola India Electronics Ltd | http://www.mot.com/miel
|
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
|
|||||||||

Cart








