processing data in the comments: very urgent

can I convert the following code



This is a simple solution to your problem:

<xsl:stylesheet version="1.0" xmlns:xsl="" >

<xsl:template match="employee">
		<xsl:call-template name="employeeCommentTransformer">
			<xsl:with-param name="commentString" select="comment()"/>

<xsl:template name="employeeCommentTransformer">
	<xsl:param name="commentString"/>
	<name><xsl:value-of select="substring-before(substring-after($commentString, 'name>'), 'name')"/></name>
	<id><xsl:value-of select="substring-before(substring-after($commentString, 'id>'), 'id')"/></id>
	<email><xsl:value-of select="substring-before(substring-after($commentString, 'email>'), 'email')"/></email>


For the scanning of the comment-string XPath
substring functions are used, depending on your
XSLT processor you may use regular-expression


I’m not aware of a reasonable way of solving this issue.
Probably it is possible (actually you may have to implement an XML parser
using XSLT) - but tedious.
What is the application scenario you want to solve?

Best regards

Actually we are extracting data from visf database and converting it to xml format.For this conversion we are using different versions of bridges.Now the task in front of us is that we have to give the backward compatability for the bridges.
There are two versions of DTDs D1 and D2. Xml file which conforms with D1 can be converted to D2.But not vise versa. Now we are planning to write a trnsfermatin where in all the elements which are not used in D2 schema file will be kept in PI or comments . And these can be extracted when we convert the xml from D2 to D1.

Please let me know if you have any good solution.