This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need attr="" in html...


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]