[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] omitting empty elements when copying
I know this must be in the archives somewhere but I can't find it. I have the following xml <CUSTOMERDATA> <Applicnt> <AT_Client_No>1</AT_Client_No> <AT_Mf_Client_No/> <AT_New_Mf_Cust_No/> <AT_Surname>Smith</AT_Surname> <AT_Initials>BG</AT_Initials> <AT_Forename_1>Bob</AT_Forename_1> <AT_Forename_2></AT_Forename_2> <AT_Display/> <AT_Title_Seq>1</AT_Title_Seq> <AT_Date_Of_Birth>12/03/1963 00:00:01</AT_Date_Of_Birth> <AT_Age_Now/> </Applicnt> <CUSTOMERDATA> I want to copy only the elements with content to get <CUSTOMERDATA> <Applicnt> <AT_Client_No>1</AT_Client_No> <AT_Surname>Smith</AT_Surname> <AT_Initials>BG</AT_Initials> <AT_Forename_1>Bob</AT_Forename_1> <AT_Forename_2></AT_Forename_2> <AT_Title_Seq>1</AT_Title_Seq> <AT_Date_Of_Birth>12/03/1963 00:00:01</AT_Date_Of_Birth> </Applicnt> <CUSTOMERDATA> Is there an efficient way of doing this or do I have to test for there being content in each element and then use xsl:copy? I had hoped there may be a way to do it with xsl:copy. Regards Jan -------------------------------------------------------------------------- CONFIDENTIALITY The information contained in this e-mail and any files transmitted with it is private and confidential. It is intended for the named addressee only. If you are not the intended addressee you are prohibited from storing, copying or using the information in any way. If you received this e-mail due to a transmission error please notify the sender immediately. No liability is accepted by Northern Rock for any losses caused by viruses contracted during transit over the Internet or present in any receiving system. This e-mail is not intended to create legally binding commitments on behalf of Northern Rock plc, nor do its contents reflect the corporate views or policies of Northern Rock plc. -------------------------------------------------------------------------- This message has been checked for all email viruses by the Energis NetscanCentral solution. 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
|