Saturday, October 6, 2012

Reading #5

 XPath Tutorial. (n.d.) Retrieved October 3, 2012 from W3Schools: http://www.w3schools.com/xpath/default.asp


This W3C tutorial was helpful in providing a concise yet comprehensive review of XPath.  Given my difficulties with Schematron this past week, I did a lot of readings to try and figure out the problem.  This reading begins simply with first describing what XPath is.  A Venn Diagram demonstrates the relationship that XPath has with other XML functions and applications, such as XQuery, XPointer, XLink and XSLT.  A bulleted list also provides understanding.  For example, "XPath uses path expressions to navigate in XML documents."  The reading then points out that these path expressions are used to select nodes or node-sets in an XML document and look and behave similarly to computer files.

The reading then moves on to discuss the relationship of nodes.  Parent, children, sibling, ancestor, and descendant nodes are explained.  Even though I have a pretty good grasp of node relationships, I really appreciated that examples were included in the reading.  I especially liked how the examples were pretty much consistent.  If I were new to this concept, it would have really helped me get used to the XML example document, instead of changing just soon as I started understanding the idea.


I was hoping that the next section would help me figure out what was wrong with my Schematron because it was about selecting nodes.  I have a feeling that because no errors were being found in the XML documents I ran against Schematron that the problem was with the Schematron not catching on to the right places in the document.  However, I still don't really understand why the direct XPath is working, but the validation run through Schematron is not.  I reviewed the section on selecting nodes, but I didn't find anything that helped.  I feel like I am back at square one now.  At the very least, I had a good review of XPath. 

No comments:

Post a Comment