Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] (newby) define an attribute based on an attribute value

From: "Michael Kay" <mike@------------>
To:
Date: 4/1/2005 9:15:00 AM
> Thanks for the suggestion!
> I didn't know I could use such a syntax...

It's surprising how many XSLT users don't.
> 
> What do the curly braces exactly mean? Do they reppresent just a
> simple XPath match and substitution in a more readable form?

It's called an "attribute value template". You can write any XPath
expression inside the curlies, and the result of the expression is converted
to a string and included in the attribute value.
> 
> (I use xsltproc to process my XSL transformation... is it a 
> good choice?)
> 

You can't expect me to give an objective answer on that one...

I would say, however, it's worth having more than one XSLT processor in your
kitbag. There will always be times when you're convinced you've found a bug
in your XSLT processor, and running the same transformation on a different
processor will often disabuse you of that theory. If you write something
that has chronically bad performance, running on a different processor will
tell you whether the problem is in your code or in the processor that you're
using. Also, if you don't understand the error messages from one processor,
a different processor may express it in terms that make more sense in your
situation. Finally, it will prevent you from using vendor extensions unless
you have a really good reason to do so, which is generally good practice.

For many people now the big decision is not which XSLT processor to use, but
whether and when to start taking advantage of XSLT 2.0. See recent threads
on that topic.

Michael Kay
http://www.saxonica.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent