RE: [xsl] sum function and math expressions

Subject: RE: [xsl] sum function and math expressions
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 8 Apr 2005 12:21:19 +0100
In general XSLT transformations are not reversible.

For example, the following transformation is obviously non-reversible:

<xsl:template match="/">
<z><xsl:value-of select="count(//*)"/></z>
</xsl:template>

There may be some transformations that are reversible, but as with any other
programming language, you will have to write the reverse transformation by
hand.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: omprakash.v@xxxxxxxxxxxxx [mailto:omprakash.v@xxxxxxxxxxxxx] 
> Sent: 08 April 2005 12:06
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [xsl] sum function and math expressions
> 
> 
> 
> Hi,
>            After posting a lot of questions in the past few days and
> receiving helpful answers for many of those, I would like to 
> pose another
> question hoping to get a  learned reply from some of the 
> experts in the
> group. The problem as is common to other problems is " Is 
> this doable using
> XSLT".
> 
> Iam trying to take a htm file that I have just transformed 
> from an XML file
> back into the XML file by performing an inverse transform. 
> This process
> cannot be "lossy"  for it to be useful. i.e the xml file 
> generated by the
> inverse transform should be identical in all respects (to an 
> accuracy of
> 99.1% - the remainder allowed for unavoidable things like 
> cdata sections
> etc.).
> 
> The problem areas I have noticed so far are as follows though 
> there could
> be many others:
> 
> 1. namespace declarations
> 2. entities
> 
> I would appreciate a candid answer if possible.
> 
> Cheers,
> Omprakash.V
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> This e-Mail may contain proprietary and confidential 
> information and is sent for the intended recipient(s) only. 
> If by an addressing or transmission error this mail has been 
> misdirected to you, you are requested to delete this mail immediately.
> You are also hereby notified that any use, any form of 
> reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, 
> contents or its attachment other than by its intended 
> recipient/s is strictly prohibited.
> 
> Visit Us at http://www.polaris.co.in

Current Thread