[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Stepping through XPath in a visual XPath debugger
Hi,
At 01:08 PM 7/31/2007, Mike wrote: > a) What is the most intuitive order in which to step-through > an XPath 1.0 expression visually? While admitting, in sympathy with this caution, that it is an academic exercise to view the evaluation of an XPath expression sequentially, it might be helpful to see how we've learned to teach neophytes to interpret XPath 1.0 location paths: 1. The concept of a step, each step being evaluated from the context of the previous step 2. Anatomy of a step: 2a Axis (required) 2b Node test (required) 2c Predicate(s) (optional) 3. Axes in detail 4. Node tests in detail 5. Predicates (as filters of sets of nodes) 6. Abbreviations (or, short vs long syntax) It is of particular interest that XPath abbreviations sometimes have the effect of obscuring exactly what the axis and node tests are in a particular step. Accordingly, when we teach this subject at Mulberry, we lay some stress (how much depends on the class) on the long syntax, as it indicates explicitly just what is happening. So I should think that a nice visualization of XPath would do, at least, the following: 1. Translate from short (abbreviated) syntax into long syntax 2. Discriminate between the steps in a path 3. Optionally, discriminate between the parts of each step 4. Show which nodes were selected in each step (perhaps identified in relation to the step's context) Note that there have already been some worthy visualization tools for XPath, but nothing is a substitute for a concrete, meaningful example. While being able to visualize it generally is useful, it really clicks into place when students can see *why* particular XPaths are used in particular situations. This helps to dramatize which sorts of things matter (context nodes) and which ones don't (short or long syntax). Cheers, Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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
|