Related Entries

XWT
Using Leo for reST
Water!
XML editing with XML schema
Why XML?

« Teaching Java
» Joy of Python: Blogrolling

Using XPath and XPointer

Good set of 10 tips while working with the least programmer-friendly scheme of all.

O'ReillyNet: Top Ten Tips to Using XPath and XPointer “XPath and XPointer allow developers to find specific information inside an XML document and manipulate that information. John Simpson, author of XPath and XPointer, offers ten tips that XML developers can put to use immediately.”

Pretty good article.

  1. Beware of whitespace when counting nodes.
  2. Keep an open mind about predicates: nested, "compound," and so on.
  3. The string-value of a node is just a special case of the string-value of a node-set.
  4. Remember the difference between value1 != value2 and not(value1 = value2).
  5. Find and use a good tool for testing your XPath expressions.
  6. Explore EXSLT.
  7. Fail-safe your XPointers.
  8. Remember to keep namespaces straight (in both XPath and XPointer applications).
  9. Don’t forget processor efficiency in XPath and XPointer.
  10. Keep an eye out for spec changes.

Recently, I tried to use XML and XSL for a simple quiz. One thing I can tell for sure is that XSL is a horrible language for common programmatic idioms like conditionals and looping. I’m really scared of the day when buzz-word-happy managers out there start dictating that programmers use XML for everything, including coding. Let us rewrite our core product using cML, a new dialect of C language with XML flavour added in.

I wrote about this in the context of BPML. Programmers need to know some tools and then pick the proper tool for the proper job.

//-->