[Home] [By Thread] [By Date] [Recent Entries]
At 2006-04-14 20:50 +0530, Ramakant Akhairamka wrote:
when i try to use <xsl:element .. /> in main template it gets generated fine. Note in the above how you have a default namespace in scope. But above, you not have a default namespace in scope. <Tag1 xmlns:a="http://www.abcd.com/abCD" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.abc.com/wahtever" xsi:schemaLocation="http://www.abc.com/wahtever myschema.xsd"> So the above results are expected. If you need the <abc/> to be in the same namespace, then move the xmlns="http://www.abc.com/wahtever" declaration to the stylesheet document element. Chapter and verse of XSLT 1.0 7.1.2 reads: "If the namespace attribute is not present then the QName is expanded into an expanded-name using the namespace declarations in effect for the xsl:element element, including any default namespace declaration." I hope this helps. . . . . . . . . . . . . Ken -- Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16 Also for XML/XSLT/XSL-FO training:Birmingham,England 2006-05-22/25 Also for XSLT/XSL-FO training: Copenhagen,Denmark 2006-05-08/11 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|

Cart



