[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XML attribute value to pattern match of the replace f
Dear Team, How can I assign the attribute value to pattern of the replace function, kindly guide me. Input XML: <caseref party1="Drury" party2="Secretary of State for the Environment, Food and Rural Affairs">Drury v Secretary of State for the Environment, Food and Rural Affairs [2004] EWCA Civ 200; [2004] 1 W.L.R. 1906 </caseref> XSL: <hov:template match="caseref"> <hov:element name="caseref"><hov:value-of select="replace(., '(@party1.*?@party2)', '<cite>$1</cite>')"/></hov:element> </hov:template> Needed XML: <caseref party1="Drury" party2="Secretary of State for the Environment, Food and Rural Affairs"><cite>Drury v Secretary of State for the Environment, Food and Rural Affairs</cite> [2004] EWCA Civ 200; [2004] 1 W.L.R. 1906 </caseref> Note: I have defined in char-map for < and > Thanks, Selva Confidentiality Notice: This transmittal is a confidential communication. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error and that any review, dissemination, distribution or copying of this transmittal is strictly prohibited. If you have received this communication in error, please notify this office immediately by reply and immediately delete this message and all of its attachments, if any.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|