 |
|
THE XML REVOLUTION - TECHNOLOGIES FOR THE FUTURE WEB
|
|
Abbreviations
Syntactic sugar: convenient notation for common situations
| Normal syntax | | Abbreviation |
| child:: | | nothing (so child is the default axis) |
| attribute:: | | @ |
| /descendant-or-self::node()/ | | // |
| self::node() | | . (useful
because location paths starting with / begin evaluation at the root) |
| parent::node() | | .. |
Example:
selects all href attributes in descendants of the context node.
Furthermore, the coercion rules often allow compact notation, e.g.
refers to the third foo child element of the context node
(because 3 is coerced to position()=3).
|
COPYRIGHT © 2000-2003
ANDERS MØLLER & MICHAEL I. SCHWARTZBACH
|
|
| | Copyright© 1998-2004 All Rights Reserved. No portion of this site may be reproduced or redistributed without prior written permission from VistaEdge Technologies
All registered trademarks appearing on this site are the property of their respective owners. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries. This site is not connected to Sun Microsystems, Inc. and is not sponsored by Sun Microsystems, Inc. | |
|  |