Re: [xsl] Need attr="" in html...

Subject: Re: [xsl] Need attr="" in html...
From: "David N Bertoni/Cambridge/IBM" <david_n_bertoni@xxxxxxxxxx>
Date: Thu, 27 Jun 2002 13:12:50 -0700
> Come to think of it, why serialize an attr="" to just attr in the first
> place. selected in <option> should be selected="selected" and not
> selected="" (according to xhtml). But I'm sure there's a reason and
> I bet someone's gonna hit me with it ;)
>
> -Kurt.

There is no standard method in XSLT for serializing XHTML.  When
serializing HTML, the processor is obliged to output certain boolean
attributes in minimized form:

   http://www.w3.org/TR/xslt#section-HTML-Output-Method

   "The html output method should output boolean attributes (that is
   attributes with only a single allowed value that is equal to the name of
   the attribute) in minimized form. For example, a start-tag written in
   the stylesheet as

   <OPTION selected="selected">
   should be output as

   <OPTION selected>"

If you've specified XML as the method in the stylesheet's xsl:output
element, then the processor should output the attribute as you are
expecting.  If it outputs an attribute in minimized form, then it's a bug.

Dave



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread