list pulled out of containing para in html output

View: New views
5 Messages — Rating Filter:   Alert me  

list pulled out of containing para in html output

by David Cramer (Tech Pubs) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Using the 1.72.0 html xsls with para.propagates.style=1 using saxon 6.5 if I do:
 
<para role="client">Some intro text:
  <itemizedlist>
 <listitem>
   <para>My listitem</para>
 </listitem>
  </itemizedlist>
</para>
 
In the output, the ul is pulled out of the containing para:
 
<p class="client">Some intro text:</p>
<ul><li><p>My listitem</p></li></ul>
 
So I lose the ability to use the class to style the text with my css. Is this a bug or some feature I don't understand?
 
Thanks,
David

Re: list pulled out of containing para in html output

by Philipp Kempgen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Cramer schrieb:

> Using the 1.72.0 html xsls with para.propagates.style=1 using saxon 6.5
> if I do:
>  
> <para role="client">Some intro text:
>   <itemizedlist>
>  <listitem>
>    <para>My listitem</para>
>  </listitem>
>   </itemizedlist>
> </para>
>  
> In the output, the ul is pulled out of the containing para:
>  
> <p class="client">Some intro text:</p>
> <ul><li><p>My listitem</p></li></ul>
>  
> So I lose the ability to use the class to style the text with my css. Is
> this a bug or some feature I don't understand?

That is because <ul> is a block-level element.
Block-level elements are not allowed inside <p>.

I think with make.valid.html=0 and/or html.cleanup=0 the stylesheets
don't unwrap your <ul> (but leave you with invalid HTML of course).

I cannot comment on whether the class should be propagated to the
<ul> or not, or if <para>s which contain block-level elements should
rather be transformed to <div>s instead of <p>s.


    Philipp Kempgen
--
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
--

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


RE: list pulled out of containing para in html output

by David Cramer (Tech Pubs) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> -----Original Message-----
> From: Philipp Kempgen [mailto:philipp.kempgen@...]

<snip>

> That is because <ul> is a block-level element.
> Block-level elements are not allowed inside <p>.
>
> I think with make.valid.html=0 and/or html.cleanup=0 the
> stylesheets don't unwrap your <ul> (but leave you with
> invalid HTML of course).
>
> I cannot comment on whether the class should be propagated to
> the <ul> or not, or if <para>s which contain block-level
> elements should rather be transformed to <div>s instead of <p>s.

Ok. I see now that the xsls have to unwrap things to get valid html. I
think putting a div with the class around the unwrapped <p>s, <ul>s etc.
would be the right thing to do, but it could get complicated since
ideally you'd only do it if para.propagates.style is 1 and the para
contains blocks. Otherwise, it would add a lot of unneeded divs in the
output.

For now, <xsl:template match="*" mode="class.attribute"> gives me a hook
for propagating the style for other elements, so I just use that.

Thanks,
David

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: list pulled out of containing para in html output

by Keith Fahlgren-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jun 10, 2009 at 7:18 AM, David Cramer<dcramer@...> wrote:
> Using the 1.72.0 html xsls

1.72.0 was released 869 days ago. While I'm not certain your issue
would be fixed, it would probably be easier to answer questions if you
were using a more recent version of the stylesheets. Are you able to
upgrade?


Thanks,
Keith

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


RE: list pulled out of containing para in html output

by David Cramer (Tech Pubs) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have elaborate customization layers for several different output types
(monolithic html, chunked html, chm, eclipse, two flavors of pdf) so I
dread the merge pain and debugging of upgrading, but you're right, 2.5
years is long enough.

Thanks,
David

> -----Original Message-----
> From: Keith Fahlgren [mailto:abdelazer@...]
> Sent: Wednesday, June 10, 2009 9:59 AM
> To: David Cramer
> Cc: docbook-apps
> Subject: Re: [docbook-apps] list pulled out of containing
> para in html output
>
> On Wed, Jun 10, 2009 at 7:18 AM, David
> Cramer<dcramer@...> wrote:
> > Using the 1.72.0 html xsls
>
> 1.72.0 was released 869 days ago. While I'm not certain your
> issue would be fixed, it would probably be easier to answer
> questions if you were using a more recent version of the
> stylesheets. Are you able to upgrade?
>
>
> Thanks,
> Keith
>

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...