4 ms·
XSL is a case that even authors found XML syntax too obnoxious, so they included special non-XML syntax in string attributes.
by dozzie 11y ago
XSL is a case that even authors found XML syntax too obnoxious, so they
included special non-XML syntax in string attributes.
- xaduha 11y agoIt was practical, easy enough to do and didn't break any existing stuff. It's still XML, right? So why not? Nothing to do with obnoxiousness.
- spdustin 11y agoAre you referring to Attribute Value Templates? <div id="{@ID}"/> It's simply a built-in template for "xsl:value-of" result fragments to be embedded directly in the literal result fragment's attribute. Call it "string interpolation", since it effectively serves the same purpose specifically for attributes in your literal markup for a given template. <div> <xsl:attribute name="id"> <xsl:value-of select="@ID"> </xsl:attribute> </div> AVT is much nicer, to my eyes, though I will use the longer notation for more complex values. And, by definition, it's standard XSL.