Jump to content

billythekid

Members
  • Posts

    2
  • Joined

  • Last visited

billythekid's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thanks Steve, for your answer. Correcting myself, the example I gave is almost like the example in w3schools. I've inserted the attribute in the cd. So, you mean that I cannot have attributes named with namespaces?Regards!Igor Felix
  2. Hello! I'm having problems in obtaining XML parameters with namespaces, and only those with namespaces. Here is part of the XML:<catalog> <cd test1:test2="test"> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> ...</catalog>This is from one of the first examples in XSLT tutorial of w3schools.And here is the corresponding XSL:<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/><xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Title</th> <th align="left">Artist</th> <th align="left">Year</th> <th align="left">Test</th> </tr> <xsl:for-each select="catalog/cd"> <tr> <td><xsl:value-of select="title"/></td> <td><xsl:value-of select="artist"/></td> <td><xsl:value-of select="year"/></td> <td><xsl:value-of select="@test1:test2"/></td> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet>The problem happens when using the fourth column of the table. The transformation just returns null. I've searched in Google, but found nothing. Can anyone help me?There is another problem: how can I use tags that have a namespace, like for example <SOAP:Envelope> or <SOAP:Body>?Thanks in advance!Igor Felix
×
×
  • Create New...