[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: On the fly search and replace using XSLT 2.0

Subject: RE: On the fly search and replace using XSLT 2.0
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 15 Mar 2010 12:26:17 -0400
RE:  On the fly search and replace using XSLT 2.0
Hi,

At 10:13 AM 3/15/2010, you wrote:
> What is the best way to markup and replace a word on the fly
> using XSLT 2.0.
>
> I am considering using a markup e.g. _applicationname_label_,
> _applicationname_description_, _slogan_label_ in my
> documents, to enforce consistency in naming and descriptions
> of products etc.

I would suggest using XML markup instead. Given a decent XML editor, the
chances are that fewer keystrokes will be required than for your proprietary
markup, and errors will be spotted sooner and identified more directly.

Note in particular that you don't need an entire element type for each type of label. One or two may do nicely.


<label which="applicationname"/>, <description which="applicationname"/>, <label which="slogan"/> etc.

As Mike says, this gives you lots more capability for creating and controlling (validating) the dynamic content with the document, as well as making for easier transformations.

Another possibility would be processing instructions, as in <?applicationname_label?>, but these are usually considered to be best managed behind the scenes rather than by and for users. Depending on how your users are creating content and on how your documents are being validated, this might be a workable option too.

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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.