ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xsl-list
xsl-list
[xsl] removing namespace
by Peter Ivan other posts by this author
Dec 27 2005 11:27AM messages near this date
[xsl] Could not compile stylesheet message upon running transformation in java | RE: [xsl] removing namespace
& XSLT Dear ALL

I have a simple query regarding xsl namespace .
My input xml looks like this
<?xml version="1.0" encoding="UTF-8"?> 
<DeliveryCALetter> 
<levering> 
<soort_bestand> RNE-CADO</soort_bestand>
<aanmaak_datum> 20051221</aanmaak_datum>
<aanmaak_tijd> 123048</aanmaak_tijd>
<raboict_ob_klant> CADO1</raboict_ob_klant>
<batch_nummer> 3</batch_nummer>
</levering> 
</DeliveryCALetter> 
The number of elements inside levering can varry.
My out put should look like this

<?xml version="1.0" encoding="UTF-8"?> 
<DeliveryCALetter xmlns="http://helloworld.com/"> 
<levering> 
<soort_bestand> RNE-CADO</soort_bestand>
<aanmaak_datum> 20051221</aanmaak_datum>
<aanmaak_tijd> 123048</aanmaak_tijd>
<raboict_ob_klant> CADO1</raboict_ob_klant>
<batch_nummer> 3</batch_nummer>
</levering> 
</DeliveryCALetter> 
For adding this default namespace i have made an XSL



<?xml version="1.0" encoding="UTF-8"?> 
<xsl:template match="/"> 
   <xsl:apply-templates select="DeliveryCALetter"/> 
</xsl:template> 
<xsl:template match="DeliveryCALetter"> 
<DeliveryCALetter xmlns="http://helloworld.com/"> 
<xsl:copy-of select="levering"/> 
</DeliveryCALetter> 
</xsl:template> 

But the output it gives me
<?xml version="1.0" encoding="UTF-8"?> 
<DeliveryCALetter xmlns="http://helloworld.com/"> 
<levering xmlns=""> 
<soort_bestand> RNE-CADO</soort_bestand>
<aanmaak_datum> 20051221</aanmaak_datum>
<aanmaak_tijd> 123048</aanmaak_tijd>
<raboict_ob_klant> CADO1</raboict_ob_klant>
<batch_nummer> 3</batch_nummer>
</levering> 
</DeliveryCALetter> 

How can i remove xmlns="" from the tag levering.
I tried lot of techniques but was unsuccesful.

thanks and rgds
peter

_________________________________________________________________
NRIs, paying for Money Transfers to India? Use Money2India. It�s FREE 
http://creative.mediaturf.net/creatives/msn_product.htm


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@[...].com> 
--~--
Thread:
Peter Ivan
Michael Kay
Peter Ivan

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved