OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] website 2.6


On 09/14/2012 11:38 AM, DaveP wrote:
On 09/14/2012 11:16 AM, Jirka Kosek wrote:
On 14.9.2012 11:15, DaveP wrote:

I am stuck, wondering where the charset definition is coming from?

It is automatically generated if the output method is HTML. This is
standard feature of XSLT.


?
Input
<?xml version="1.0" encoding="utf-8"?>
<doc/>


ss
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 version="1.0">

   <xsl:output method="html"/>

   <xsl:template match="/">
     <html>
       <body bgcolor="#FFFFFF">

       </body>
     </html>
   </xsl:template>

</xsl:stylesheet>

output

$ sax crap.xml crap.xsl crap.html
[dpawson@homer xsl]$ cat crap.html
<html>
    <body bgcolor="#FFFFFF"></body>

Yes, you are right Jirka.
http://www.w3.org/TR/xslt#section-HTML-Output-Method

If there is a HEAD element, then the html output method should add a META element immediately after the start-tag of the HEAD element specifying the character encoding actually used. For example,

Notes it is a 'should'

If I add the head element, I get the meta output, with the
encoding (seemingly ) derived from the input xml encoding.

So where do the website stylesheets get the encoding from?

Puzzling






regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]