RE: Copy namespace definition to the result tree using
Hi Mike, Is there no way I can output the element as <xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema"> instead of just <xsd:schema>. I understand that it is redundant and hence it does not output the xmlns attribute. But it is required for the application I am working on. I also tried adding the xmlns attribute using <xsl:attribute> element but even the the transformer does not output the xmlns attribute. It seems that xmlns is a reserved attribute or QName and hence the transformer ignores it. Any ideas??? Thanks Kishore -----Original Message----- From: Michael Kay [mailto:mhkay@xxxxxxxxxxxx] Sent: Tuesday, March 13, 2001 2:00 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: Copy namespace definition to the result tree using xslt > I am not able to output the namespace definition to the result tree. > > The EXPECTED OUTPUT file from the XSLT file should look like this: > <?xml version="1.0" encoding="UTF-8"?> > <transactions xmlns:xsd="http://www.w3.org/1999/XMLSchema"> > <mytesting> > <xsd:schema > xmlns:xsd="http://www.w3.org/1999/XMLSchema"> > <-- problem line I don't see anything in your XSLT that outputs the <transactions> element, but never mind. The xmlns:xsd declaration on your <xsd:schema> element is completely redundant according to the XPath data model (you get the same XPath tree whether it is there or not) and therefore an XSLT processor will not normally generate it. Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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