[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

Subject: XML attribute value to pattern match of the replace function
From: "Selvaganesh" <selvaganesh_t@xxxxxxxxxxxxxx>
Date: Sat, 20 Feb 2010 21:04:04 +0530
 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)', '&lt;cite&gt;$1&lt;/cite&gt;')"/></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 &lt; and &gt;

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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.