G
Guest
I have a form containing an HTML editor to permit users to create templates
similar to Word's templates. I'm having to do it this way as we need to save
the template layout in SQL Server. Anyway ...
Based on the user's work area and the process they've selected to create the
template for, a dropdown list containing allowable data fields is populated.
The user then has the ability to select a data field and place it wherever
they wish within the template. A typical example of the HTML code generated
for such a data field is as follows:
<span contenteditable="false" style="color: #000000; background-color:
#ffff00">{{Date}}</span>
My problem is I need to convert the HTML into XSL to feed a Windows Service
that will take the XSL and a dataset and merge them together. In order to do
so, I need to strip out <span contenteditable="false" style="color: #000000;
background-color: #ffff00">{{ as well as }}</span>.
In place of the first phrase, I need to replace it with something like
<xsl:value-of select=", followed (in this example) by Date, and followed by
"/>. In other words, the output for this example should be as follows:
<xsl:value-of select="Date" />
How must I code my Regular Expression to accomplish this?
similar to Word's templates. I'm having to do it this way as we need to save
the template layout in SQL Server. Anyway ...
Based on the user's work area and the process they've selected to create the
template for, a dropdown list containing allowable data fields is populated.
The user then has the ability to select a data field and place it wherever
they wish within the template. A typical example of the HTML code generated
for such a data field is as follows:
<span contenteditable="false" style="color: #000000; background-color:
#ffff00">{{Date}}</span>
My problem is I need to convert the HTML into XSL to feed a Windows Service
that will take the XSL and a dataset and merge them together. In order to do
so, I need to strip out <span contenteditable="false" style="color: #000000;
background-color: #ffff00">{{ as well as }}</span>.
In place of the first phrase, I need to replace it with something like
<xsl:value-of select=", followed (in this example) by Date, and followed by
"/>. In other words, the output for this example should be as follows:
<xsl:value-of select="Date" />
How must I code my Regular Expression to accomplish this?