Few DocBook queries and DSSSL

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

Few DocBook queries and DSSSL

by linuxguy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I'm not sure if these questions are appropriate in this forum. I'm pretty new to DocBook. I understood the concept well. I had a few questions.

I'm trying to make a HTML -> DocBook converter. Basically, it will take an HTML file and try to generate DocBook content. I know it may sounds dumb but thats what I'm trying to make. So how do I bring structure ( DocBook ) to an unstructured document ( HTML )?

While I was learning about the formatting of the DocBook content I came across DSSSL. I got many resources online but all of them have a very steep learning curve. Are there any simple books / online tuts that I may have missed?

One problem that I'm not able to solve is, I'm trying to change the way title of my book is formatted. So I made a .dsl file and put the following content:

( element ( bookinfo title )
        ( make paragraph
                font-family-name: "Times New Roman"
                space-before: 10pt
                space-after: 10pt
                font-size: 36pt
                ( process-children )
        )
)

But it simply doesn't show up. Infact the change reflects in all titles except the cover page. The DocBook code is as follows:

<book id="my-new-book" lang="en">
   <bookinfo>
      <title>This is the title of the book!</title>
      <date>12th August 2007</date>
      <releaseinfo>Released by test!</releaseinfo>
      <authorgroup>
         <author>
            <othername>t</othername>
            <surname>stest</surname>
            <firstname>ftest</firstname>
         </author>
      </authorgroup>
   </bookinfo>
   <chapter id="chapter1">
      <title>This is a title of chapter 1</title>
      <sect1 id="sample-sect-1-1">
          <title>This is some text inside a section</title>
          <para>This is a para inside a section</para>
      </sect1>
   </chapter>
   <chapter id="chapter2">
      <title>This is a title of chapter 2</title>
      <sect1 id="sample-sect-1-2">
         <title>This is some text inside a section</title>
         <para>This is a para inside a section</para>
      </sect1>
    </chapter>
</book>

Re: Few DocBook queries and DSSSL

by Dave Pawson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

linuxguy wrote:
> Hi, I'm not sure if these questions are appropriate in this forum. I'm pretty
> new to DocBook. I understood the concept well. I had a few questions.
>
> I'm trying to make a HTML -> DocBook converter. Basically, it will take an
> HTML file and try to generate DocBook content. I know it may sounds dumb but
> thats what I'm trying to make. So how do I bring structure ( DocBook ) to an
> unstructured document ( HTML )?

Try grouping, but use xslt, preferably xslt 2.0?


>
> While I was learning about the formatting of the DocBook content I came
> across DSSSL. I got many resources online but all of them have a very steep
> learning curve. Are there any simple books / online tuts that I may have
> missed?

Only one book,
http://www.amazon.com/DSSSL-Book-SGML-Programming-Language/dp/1402075928
Rather pricy.

Lots more on xslt, a couple on Xslt 2.0



HTH



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


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


Re: Few DocBook queries and DSSSL

by doobs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 28 September 2007 18:27, Dave Pawson wrote:

> linuxguy wrote:
> > Hi, I'm not sure if these questions are appropriate in this forum. I'm
> > pretty new to DocBook. I understood the concept well. I had a few
> > questions.
> >
> > I'm trying to make a HTML -> DocBook converter. Basically, it will take
> > an HTML file and try to generate DocBook content. I know it may sounds
> > dumb but thats what I'm trying to make. So how do I bring structure (
> > DocBook ) to an unstructured document ( HTML )?
>
> Try grouping, but use xslt, preferably xslt 2.0?

try a google search for Html2DocBook.xsl
I think it uses bridgeheads rather than sections and
maybe you need to run the html through htmltidy first?


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


Re: Few DocBook queries and DSSSL

by linuxguy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dave Pawson wrote:
linuxguy wrote:

Try grouping, but use xslt, preferably xslt 2.0?
Okay... have found a few resources on XSLT. Will see about purchasing that book too :) Thanks for your help!

Regards.

Re: Few DocBook queries and DSSSL

by linuxguy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

doug-49 wrote:
try a google search for Html2DocBook.xsl
I think it uses bridgeheads rather than sections and
maybe you need to run the html through htmltidy first?
found a few resources:

http://www.eecs.umich.edu/~ppadala/projects/tidy/

http://freshmeat.net/projects/dbdoclet/

i've not yet completely checked out the second link. but it looks interesting nevertheless.

Thanks.

RE: Few DocBook queries and DSSSL

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

Reply to Author | View Threaded | Show Only this Message

I've used dbdoclet for processing javadoc comments to docbook. It works
well and the maintainer is responsive if you find bugs, so I'd definitly
give it a try. Btw., here's a list of "up converters" for docbook:

http://wiki.docbook.org/topic/DocBookTools#head-2398989b220493217aea4765
d199b2c04eed4892
 
I don't know if anybody has made available a xslt 2.0 xhtml to docbook
stylesheet, but it's exactly the kind of task xslt 2.0 would be well
suited to (i.e. compared to xslt 1.0).

David

> -----Original Message-----
> From: linuxguy [mailto:virtualdj2@...]
> Sent: Saturday, September 29, 2007 2:19 PM
> To: docbook@...
> Subject: Re: [docbook] Few DocBook queries and DSSSL
>
>
>
> doug-49 wrote:
> >
> > try a google search for Html2DocBook.xsl I think it uses
> bridgeheads
> > rather than sections and maybe you need to run the html through
> > htmltidy first?
> >
>
> found a few resources:
>
> http://www.eecs.umich.edu/~ppadala/projects/tidy/
>
> http://freshmeat.net/projects/dbdoclet/
>
> i've not yet completely checked out the second link. but it
> looks interesting nevertheless.
>
> Thanks.
> --
> View this message in context:
> http://www.nabble.com/Few-DocBook-queries-and-DSSSL-tf4527206.
html#a12958793
> Sent from the docbook General mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@...
> For additional commands, e-mail: docbook-help@...
>
>

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