Altova Mailing List Archives

RE: [xsl] href problem...using CDATA needed?

From: Wendell Piez <wapiez@---------------->
Date: 6/13/2003 1:18:00 PM
At 04:24 PM 6/13/2003, TomP wrote:
In your template, it seems very unusual to have an apply-templates
instruction within the body of an anchor element.  An anchor is supposed
to contain only inline elements - it is not clear why you would need
apply-templates. If it is going to return structured information, an
anchor element is the wrong place for it.  If it is going to return a
bit of text like a label, chances are you can do it with just

I disagree with Tom here. I prefer to use xsl:apply-templates by default 
all the way down, and only go to xsl:value-of (or something else) as the 
motivated exception.

This may because I deal a lot with messy documentary data that often 
includes lots of mixed content, including even mixed content in the midst 
of anchor tags and such like (they do happen). The graceful way XSLT's 
so-called "push" model deals with mixed content is among its greatest 
misunderstood and discounted strengths. (But then mixed content itself 
seems to be a deep mystery to some.)

There can also be stuff like images in there.

In fact, with newbies I like to slap their hands for using value-of without 
thinking about why. :->

(This is not to say that I don't trust Tom to do the right thing for his 
situation: I do.)


    "Thus I make my own use of the telegraph, without consulting
     the directors, like the sparrows, which I perceive use it
     extensively for a perch." -- Thoreau

XSL-List info and archive:


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 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.