[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XPath: how to select based on element type?

  • From: Sankaranarayanan K V <sankar@m...>
  • To: xml-dev@l...
  • Date: Mon, 08 Jan 2001 15:24:38 +0530

xpath 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.