Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML with XSLT

Status
Not open for further replies.

benoxy

Programmer
Jun 19, 2007
14
FR
I would like to make a tansformation of an XML file to another XML with XSLT.
My example don't work why ?
=xmllib->XSLT( "<RAE><vmaj>0</vmaj><vmin>0</vmin></RAE>","<?xml version=""1.0"" encoding=""UTF-8""?>"
+"<xsl:stylesheet xmlns:xsl="" version=""1.0"">"
+"<xsl:template match='node()'><xsl:copy> <xsl:apply-templates select=""node()|@*""/> </xsl:copy></xsl:template>"
)
Thank
 
Is this a map problem or an xslt problem?
If a map can you give more details - version, patch level error message etc.
 
The problem is the code xslt. I use an parameter the xsl text fragment.The WTX is version 8.1. No error in the log. The generated XML file is empty and contains no tag.
 
The XSLT function has 2 parameters
XSLT ( xml_url_or_xml_fragment, xslt_url_or_xslt_fragment )

The example in the manual shows

xmllib->XSLT( ?ipo.in.xml?, ?ipo.xsl? )
or
xmllib->XSLT( PACKAGE( source ), ?ipo.xsl? )
 
I've pack 3. If I understand it is necessary to file a xsl and not code xsl in the second parameter xmllib->XSLT(param1,param2).
 
Have you tested that your xsl works on that xml outside WTX?
 
Yes, I tested it with my oXygen and processing is done.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top