• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why no matches past the "/" and no output?

 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given



and content.xsl:



It gets as far as the "/" template in content.xsl line 7 but it goes no further. In other words the <apply-templates> on line 8 finds no matches, and I get no output. Is it some namespace problem? Thank you.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas Kennedy wrote:Is it some namespace problem?


Yes. Your "data" element name is in the default namespace, in other words in the "http://www.hp.com/dexix/content" namespace. But your stylesheet looks for "data" elements in no namespace, so it doesn't find any.

To fix that, change your stylesheet to declare the "http://www.hp.com/dexix/content" namespace and assign a prefix to it (i.e. don't make it the default namespace). You can use any prefix you like. Then change your stylesheet to search for "data" elements with that prefix, in otherwords to search for "data" elements in the "http://www.hp.com/dexix/content" namespace.
 
Thomas Kennedy
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That worked, thank you! Namespaces are slowly coming into focus.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic