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] HTML and XHTML XSL stylesheets

I just tried a customization layer that imports html/docbook.xsl and adds 
<xsl:output method="xml"/>, and the output for a literallayout element has 
<br/> after each line.  I don't understand why it doesn't work for you, but 
it should.

That said, I can't say what kind of output that would be, because it isn't 
HTML (which is SGML) and it isn't XHTML.  Like I said, if you want XML 
output, using the XHTML stylesheet should work if the formatting problems 
can be fixed.

I tried the xhtml/docbook.xsl stylesheet, and I don't get spans breaking on 
new lines in pre output.  Can you provide a better example that illustrates 
the problem?  Are you using a customization layer?  Chunking?

Bob Stayton
Sagehill Enterprises
DocBook Consulting

----- Original Message ----- 
From: "Charlie Hubbard" <charlie.hubbard@gmail.com>
To: "Bob Stayton" <bobs@sagehill.net>
Cc: "DocBook Apps" <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, August 22, 2006 12:32 PM
Subject: Re: [docbook] HTML and XHTML XSL stylesheets

>I tried changing the output method to xml in my customization layer,
> and it still outputted it as <br> or SGML equivalent.  Is there a way
> I can override it?
> My problem has to do with whitespace processing in <pre> tags.  In
> XHTML and HTML it outputs the same code something like:
> <pre>
> <span class="prompt">/user/bin:&gt;<span><span class="command">df</span>
> Device       total size  Disk Free  Percentage Free
> /dev/sda     543453     3245            5%
> /dev/sdb     678678     13245          12%
> </pre>
> In HTML it formats the span's on all one line.  However, with XHTML it
> newlines each <span> tag.  I'm recalling this from memory, but I can
> send the exact code when I get home.  I'll try the docbook stylesheets
> when I get home as well.  I'm also sending the XHTML as text/xml or
> text/application+xml HTTP header.  Should I use a different header or
> use text/html?  Should I also use the transitional HTML DTD or XHTML
> DTD?
> Thanks
> Charlie
> On 8/22/06, Bob Stayton <bobs@sagehill.net> wrote:
>> [I'm moving this over to the docbook-apps mailing list because that is
>> where stylesheet issues are discussed]
>> Using the html stylesheet will output <br> because that is proper HTML
>> output (which is SGML, not XML). When you see "<br/>" in the XSL
>> stylesheets, that is the proper XML notation for an empty element.  It 
>> is
>> the XSLT processor working with <xsl:output method="html"/> that 
>> converts
>> that to a <br> for HTML output.
>> As you say, using the xhtml stylesheet would give you <br/> and output 
>> that
>> is more easily parsed.  Many people are using the xhtml stylesheets with
>> the browsers you mention.  Can you describe the formatting problems you 
>> are
>> seeing?  Are you using a customization layer?  Do you have the same
>> problems with the stock DocBook stylesheet?
>> Bob Stayton
>> Sagehill Enterprises
>> DocBook Consulting
>> bobs@sagehill.net
>> ----- Original Message -----
>> From: "Charlie Hubbard" <charlie.hubbard@gmail.com>
>> To: <docbook@lists.oasis-open.org>
>> Sent: Sunday, August 20, 2006 9:34 PM
>> Subject: [docbook] HTML and XHTML XSL stylesheets
>> > Hi,
>> >
>> > I'm using the HTML XSL stylesheets to transform a docbook.  However,
>> > after I run the stylesheets I get strange results.  I'm getting <br>
>> > instead of <br/> or <img> instead of <img/>.  I checked the
>> > stylesheets shipped with docbook, and they all have <br/> and <img/>
>> > tags closed like in XML.  I've tried changing the output option to
>> > xml, but it still exports them without the closing tag or short hand
>> > form closing.
>> >
>> > I moved into using the HTML after using the XHTML stylesheets, but
>> > unfortunately, I ran into a bigger problem with XHTML and whitespace
>> > formating in IE and firefox.  I don't think the XHTML stylesheets are
>> > usable because of this problem.  It could be bugs in the browsers, but
>> > bugs or no bugs it still won't format correctly.
>> >
>> > I'm trying to get something that is XHTML so that it can be parsed
>> > more easily, but I have to create HTML so that the browsers will
>> > format and display the results properly.
>> >
>> > Charlie
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
>> > For additional commands, e-mail: docbook-help@lists.oasis-open.org
>> >
>> >
>> >

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