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

Re: XML attribute value to pattern match of the replac

Subject: Re: XML attribute value to pattern match of the replace function
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Feb 2010 12:09:18 -0500
Re:  XML attribute value to pattern match of the replac
At 2010-02-20 21:40 +0530, Mukul Gandhi wrote:
On Sat, Feb 20, 2010 at 9:04 PM, Selvaganesh
<selvaganesh_t@xxxxxxxxxxxxxx> wrote:
> <hov:template match="caseref">

I think, I noticed this earlier too in Selvaganesh's stylesheets :)
Couldn't resist to comment.

A prefix like, "hov" for XSLT language instructions is not a good
practice. Does anybody disagrees with this?

It is not unprecedented to use a prefix other than "xsl", and there is certainly nothing wrong with it. Though it does break with convention I can't think of a technical reason to deprecate it.


Using a prefix other than "xsl" is useful when writing stylesheets that write stylesheets (especially based on the conventions of XSLT 1 engines).

The most common convention, is to use the prefix "xsl" for XSLT
language instructions. The XSLT spec, also uses the prefix "xsl"
within itself.

Only for documentary purposes ... there are no requirements to use that prefix.


Though, it is a common practice to have business specific namespaces
(URIs & prefixes) in the instance documents.

I find using specific prefixes is only useful in documentation. There are 33 different namespaces in the UBL 2.0 vocabulary (55 and counting in UBL 2.1) and for consistency in the documentation the UBL TC has adopted a collection of namespace prefixes. But in no way do we require UBL users to use those prefixes in their XML. Having a documentary convention helps the human reader not have to constantly guess what namespace is being referred to.


But such a convention is only useful to the human reader.

Any XML instance processing based on an expected prefix is wrong because the process has no idea what prefixes the end user is going to use in an arbitrary input XML document.

I hope this helps.

. . . . . . . . . . . . Ken


-- XSLT/XQuery training: after http://XMLPrague.cz 2010-03-15/19 XSLT/XQuery training: San Carlos, California 2010-04-26/30 Principles of XSLT for XQuery Writers: San Francisco,CA 2010-05-03 XSLT/XQuery/UBL/Code List training: Trondheim,Norway 2010-06-02/11 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

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.