Subject: RE: [xsl] more elegant way to process element with default value? From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 13 Jun 2003 23:11:04 +0100 |
> 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] more elegant way to proce, Lars Huttar | Thread | RE: [xsl] more elegant way to proce, Passin, Tom |
RE: [xsl] href problem...using CDAT, Kathy Burke | Date | Re: [xsl] how to view html not xml/, Steve Rosenberry |
Month |