[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: more elegant way to process element with default v
> Umm... I just looked this up in the XML 1.0 spec (3.3.3 Attribute-Value > Normalization) and I don't understand how it is reconciled with what you said... I think it's fair to assume that if there's a discrepancy between what I said and what's in the spec, then the spec is right (blame it on my lack of typing skills:-) attribute value normalisation goes through a sequence of slightly bizarre steps which I didn't want to go into so simplified greatly but the end result most of the time is that newlines in attribute values get reported as spaces, this is why, in XSLT if you go <xsl:attribute name="x"> 1 2 3 </xsl:attribute> it will get output as x="@#10;1@#10;2@#10;3@#10;" (with & not @ I substitued to avoid some stupid mailers interpretting the character refs) This attribute, because the newlines are quoted has newlines in its value, but x=" 1 2 3 " which you might expect to be the result of the xsl:attribute would not work as the xml parse will report those as spaces not newlines. David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|