[Home] [By Thread] [By Date] [Recent Entries]
At 2009-12-04 17:04 -0500, Philip Vallone wrote:
This is a pure xpath question. Which is frequently asked. Suppose I have a namespace declaration like this: Right, but the element node in the tree has the namespace in the expanded name. I want to use local-name() to access the nodes Why? That would be improper. You want to use qualified names representing expanded names to access the node. but not sure how. For example, how do I access a path like this: In an XSLT 1 or XSLT 2 stylesheet: xmlns:ims="http://www.imsglobal.org/xsd/imscp_v1p1" ... /ims:organizations/ims:organization/ims:title[2]/ims:title XML: The expanded name in the stylesheet must match the expanded name in the XML data. The qualified name in the stylesheet can be different than the qualified name in the XML data. The qualified name in the stylesheet cannot use the default namespace in XSLT 1. In XSLT 2 you can use xpath-default-namespace= to support unprefixed names in XPath, but I've come to the conclusion it isn't helpful when more than one input namespace is in use. I hope this helps. . . . . . . . . . . . Ken -- XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



