Subject: [xsl] De Normalize XML using XSLT From: Senthilukvelaan <skumaravelan@xxxxxxxxxxxxxx> Date: Wed, 14 Oct 2009 13:31:59 -0700 |
Hi , I would like to know is there any way to group the nodes of the xml using the node name matching pattern starts-with like the sample provided. For example Say I have the xml like below <consignment> <SHIP_NAME1>Suresh</SHIP_NAME1> <SHIP_NAME3/> <SHIP_NAME4/> <SHIP_COLONIA/> <SHIP_CITY> Newyork </SHIP_CITY> <SHIP_POST_CODE>L3R 1A3</SHIP_POST_CODE> <SHIP_STREET>1010 Woodbine Ave</SHIP_STREET> <SHIP_COUNTRY>CA</SHIP_COUNTRY> <SHIP_COUNTRY_NAME>Canada</SHIP_COUNTRY_NAME> <SHIP_REGION>ON</SHIP_REGION> <SHIP_REGION_DESC>Ontario</SHIP_REGION_DESC> <BILL_NAME1>Suresh</BILL_NAME1> <BILL_NAME2/> <BILL_NAME3/> <BILL_NAME4/> <BILL_STREET>7225 woodbine street</BILL_STREET> <BILL_COLONIA/> <BILL_CITY>Newyork</BILL_CITY> <BILL_REGION>ON</BILL_REGION> <BILL_REGION_DESC>Ontario</BILL_REGION_DESC> <BILL_COUNTRY>CA</BILL_COUNTRY> <BILL_COUNTRY_NAME>Canada</BILL_COUNTRY_NAME> <BILL_POST_CODE>L3R 1A3</BILL_POST_CODE> <BILL_TELF1>12345</BILL_TELF1> <BILL_TELF2EXTN/> </consignment> Expected output For example Say I have the xml <consignment> <SHIPMENT> <SHIP_NAME1>Suresh</SHIP_NAME1> <SHIP_NAME3/> <SHIP_NAME4/> <SHIP_COLONIA/> <SHIP_CITY>Markham</SHIP_CITY> <SHIP_POST_CODE>L3R 1A3</SHIP_POST_CODE> <SHIP_STREET>7225 Woodbine Ave</SHIP_STREET> <SHIP_COUNTRY>CA</SHIP_COUNTRY> <SHIP_COUNTRY_NAME>Canada</SHIP_COUNTRY_NAME> <SHIP_REGION>ON</SHIP_REGION> <SHIP_REGION_DESC>Ontario</SHIP_REGION_DESC> </SHIPMENT> <BILLING> <BILL_NAME1>Suresh</BILL_NAME1> <BILL_NAME2/> <BILL_NAME3/> <BILL_NAME4/> <BILL_STREET>7225 woodbine street</BILL_STREET> <BILL_COLONIA/> <BILL_CITY>markham</BILL_CITY> <BILL_REGION>ON</BILL_REGION> <BILL_REGION_DESC>Ontario</BILL_REGION_DESC> <BILL_COUNTRY>CA</BILL_COUNTRY> <BILL_COUNTRY_NAME>Canada</BILL_COUNTRY_NAME> <BILL_POST_CODE>L3R 1A3</BILL_POST_CODE> <BILL_TELF1>(512)674-2000</BILL_TELF1> <BILL_TELF2EXTN/> </BILLING> </consignment> Any pointers would help. Thanks, SK
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] identity transform styles, Michael Kay | Thread | Re: [xsl] De Normalize XML using XS, G. Ken Holman |
[xsl] Change xml:lang of a skos:pre, Jürgen Jakobitsch | Date | Re: [xsl] Change xml:lang of a skos, G. Ken Holman |
Month |