Re: [xsl] Is there a way to avoid Empty Values?

Subject: Re: [xsl] Is there a way to avoid Empty Values?
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Wed, 11 Apr 2007 11:49:11 +0530
If your legacy application treats <Age></Age> as different from
<Age/>, then it's not XML compliant. I don't see any easy solution to
this problem.

On 4/11/07, binu.idicula@xxxxxxxxx <binu.idicula@xxxxxxxxx> wrote:


Hi,
 I have a translator which just copies the values of nodes and subnodes
of a selected tree.

 <xsl:template match="*">
      <xsl:element name="{name()}" namespace="{namespace-uri()}">
         <xsl:copy-of select="@*"/>
         <xsl:apply-templates/>
      </xsl:element>
 </xsl:template>

Input
-----------------
<Name>X</Name>
<Age></Age>

Output
------------------
<Name>X</Name>
<Age/>

Is there a way to preserve the empty values, because the output is used
by a Plain Parser Application which looks for <Age> and </Age> for
looking value of Age. This legacy application is not open for editing.


regards Binu Kuttikkattu Idicula


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.


WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

-- Regards, Mukul Gandhi

Current Thread