[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces and For-each
> Can anyone tell me if this is to be expected? no it's not. as it sounds like it should work. However if I ignore > In contrast, if I have a series of > templates matching "/", "*" and "my-element" with each of the doing an > apply-templates, I *do* select the "my-element". I could answer the more usuaal usual quaestion as to why //my-element might not select an element named my-element. In the hope that perhaps you lied:-) You said: > I am trying to transform a document which uses several namespace > prefixes. but whether it uses many (or even no) prefixes is not the point, the point is how many namespaces does it use, and in particular what namespace is my-element in. If your document has used xmlns="xxx" somewhere so that my-element is in the namespace xxx then <xsl:for-each select="//my-element"> will not match it, you need so do xmlns:x="xxx" in the stylesheet and use "//x:my-element" David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|