Subject: [xsl] omitting empty elements when copying From: "Hesselberth, Jan" <Jan.Hesselberth@xxxxxxxxxxxxxxxxxx> Date: Wed, 5 Feb 2003 11:56:05 -0000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Re: Partial Extraction, Michael Kay | Thread | RE: [xsl] omitting empty elements w, Michael Kay |
Re: [xsl] is XSLT 2.0 implementable, Tobias Reif | Date | RE: [xsl] Re: Partial Extraction, Michael Kay |
Month |