Guest User

Untitled

a guest
Dec 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <catalog xmlns="namespace1">
  2. <cd>
  3. <title>Empire Burlesque</title>
  4. <artist>Bob Dylan</artist>
  5. <country>USA</country>
  6. <company>Columbia</company>
  7. <price>10.90</price>
  8. <year>1985</year>
  9. </cd>
  10. <cd>
  11. <title>Hide your heart</title>
  12. <artist>Bonnie Tyler</artist>
  13. <country>UK</country>
  14. <company>CBS Records</company>
  15. <price>9.90</price>
  16. <year>1988</year>
  17. </cd>
  18. </catalog>
  19.  
  20. <books xmlns="namespace2">
  21. <cd>
  22. <title>Empire Burlesque</title>
  23. <artist>Bob Dylan</artist>
  24. <country>USA</country>
  25. <company>Columbia</company>
  26. <price>10.90</price>
  27. <year>1985</year>
  28. </cd>
  29. <cd>
  30. <title>Hide your heart</title>
  31. <artist>Bonnie Tyler</artist>
  32. <country>UK</country>
  33. <company>CBS Records</company>
  34. <price>9.90</price>
  35. <year>1988</year>
  36. </cd>
  37. </books>
  38.  
  39. <xsl:template match="ns1:*">
  40. <xsl:element name="ns2:{local-name()}">
  41. <xsl:apply-templates select="@* | node()"/>
  42. </xsl:element>
  43. </xsl:template>
  44.  
  45. <xsl:template match="ns1:*">
  46. <xsl:element name="ns2:{local-name()}" namespace="target-namespace">
  47. <xsl:apply-templates select="@* | node()"/>
  48. </xsl:element>
  49. </xsl:template>
Add Comment
Please, Sign In to add comment