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]

Re: generating xhtml with msxml3


Paul Bryant writes:

> 1) if xsl:output is set to 'html' msxml adds a meta tag with
> 'content-type' and 'encoding' attributes directly after the 'head'
> element; as the XSLT spec apparently says. However the xhtml spec
> says the first element after 'head' must be 'title'??

I don't think so. My copy says:

<!ENTITY % head.misc "(script|style|meta|link|object)*">

<!-- content model is %head.misc; combined with a single
     title and an optional base element in any order -->

<!ELEMENT head (%head.misc;,
     ((title, %head.misc;, (base, %head.misc;)?) |
      (base, %head.misc;, (title, %head.misc;))))>
  
<title> can go anywhere in <head>, but it does have to be
present.

> 2) With the output set to xml I can get round the above problem but get an
> xml processing instruction as the first line - which also compromises the
> w3 xhtml spec - doctype should be the first tag.

No, PIs can go anywhere except within start-tags or end-tags.

> I've currently worked around (2) & (3) by writing the transformation
> results to a string and then chopping off the PI, but this is crap. Any
> better ideas?

Stick to the spec and use compliant software?

///Peter

 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]