Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-11-15 Thread Jirka Kosek

"Bradford, Denis" wrote:

> 
> This thread has been quiet for awhile. I'm curious
> 
> 1) whether the nice man above is still working on such a sheet, and

I don't know, as I'm not the man. But IIRC Nik Clayton from FreeBSD was
working on such stylesheet. However I don't know if he finished. 
 
> 2) if not, people think docbook2X is the best way to go?
> 
> We've been doing both authoring and docbook.xsl transformation on Windows,
> and so I'm hoping to avoid installing and building a whole new environment
> on UNIX, as docbook2x apparently requires. Yes, even though the man pages
> will run on UNIX.

I have no personall experience with docbook2X, but you should be able to
run in Cygwin under Windows. I'm using Cygwin sucessfuly for many
Linux-originated projects and applications.

Jirka

-- 
-
  Jirka Kosek
  e-mail: [EMAIL PROTECTED]
  http://www.kosek.cz


To subscribe or unsubscribe from this elist use the subscription
manager: 



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-11-15 Thread Gregory Leblanc

On Thu, 2001-11-15 at 11:19, Bradford, Denis wrote:
> >To: docbook-apps at lists.oasis-open.org 
> >Subject: DOCBOOK-APPS: XSL from DocBook refEntry -> man 
> >From: David Hardeman  
> >Date: Mon, 09 Jul 2001 01:51:24 +0200 
> >
> >I'm wondering (cause I couldn't find any mentioning of it in the 
> >archives or in the XSL sheets made by Norman Walsh) if anyone has made 
> >any XSL stylesheets to convert refEntry DocBook documents to man pages? 
> >(it does seem strange if noone had done it before). If not, I'd be happy 
> >to start working on such a sheet.
> 
> This thread has been quiet for awhile. I'm curious 
> 
> 1) whether the nice man above is still working on such a sheet, and

Don't know the person above, but there's a patch on sourceforge.  
http://sourceforge.net/tracker/index.php?func=detail&aid=468779&group_id=21935&atid=373749
One of the KDE folks also has a perl script to do this, but I've not had
time to compare it with the XSL stylesheets above.
Greg




To subscribe or unsubscribe from this elist use the subscription
manager: 



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-11-15 Thread Bradford, Denis

>To: docbook-apps at lists.oasis-open.org 
>Subject: DOCBOOK-APPS: XSL from DocBook refEntry -> man 
>From: David Hardeman  
>Date: Mon, 09 Jul 2001 01:51:24 +0200 
>
>I'm wondering (cause I couldn't find any mentioning of it in the 
>archives or in the XSL sheets made by Norman Walsh) if anyone has made 
>any XSL stylesheets to convert refEntry DocBook documents to man pages? 
>(it does seem strange if noone had done it before). If not, I'd be happy 
>to start working on such a sheet.

This thread has been quiet for awhile. I'm curious 

1) whether the nice man above is still working on such a sheet, and

2) if not, people think docbook2X is the best way to go?

We've been doing both authoring and docbook.xsl transformation on Windows,
and so I'm hoping to avoid installing and building a whole new environment
on UNIX, as docbook2x apparently requires. Yes, even though the man pages
will run on UNIX.

Thanks,
Denis

> -Original Message-
> From: Tim Waugh [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 15, 2001 1:04 PM
> To: Tammy Fox
> Cc: docbook-apps
> Subject: Re: DOCBOOK-APPS: legalnotice id
> 
> 
> On Thu, Nov 15, 2001 at 12:29:13PM -0500, Tammy Fox wrote:
> 
> > I have my stylesheet set to generate a link to a separate
> > HTML page for the legalnotice. My legalnotice has
> > an id set for it: ,
> > but the HTML filename for it is still randomly generated.
> > Am I doing something wrong or is this a bug?
> 
> I think this is intentional.  Take a look at html/dbparam.dsl:300
> where there is this comment:
> 
>   ;; Name of the output file for legal notices if
>   ;; '%generate-legalnotice-link%' is true.  Since several legal
>   ;; notices may occur (in a Set of Books, for example), this is no
>   ;; longer a fixed filename.
> 
> How about this?:
> 
> (define ($legalnotice-link-file$ legalnotice)
>   (if (and %use-id-as-filename%
>  (attribute-string (normalize "id") legalnotice))
>   (string-append (case-fold-down (attribute-string 
> (normalize "id")
>  legalnotice))
>%html-ext%)
>   (string-append "ln"
>(number->string (all-element-number legalnotice))
>%html-ext%)))
> 
> Tim.
> */
> 


To subscribe or unsubscribe from this elist use the subscription
manager: 



Re: XSLT for text files ?(Re: DOCBOOK-APPS: XSL from DocBook refentry-> man)

2001-07-11 Thread Michael Westbay

To Walsh-san's comment:

> >When does that happen? I haven't played much with text output, nor
> >read that part of the spec recently, but I would have expected UTF-8
> >text output to be able to handle any XML character.

Dave Pawson-san wrote:

> Yes, but some text based formats use non XML characters.
> The ones I've heard requested were less than 9 in an ASCII encoding?

If ASCII is what you want, then why not specify the encoding:

  

I use this often for Japanese HTML pages where the "standard" is iso-2022-jp:

  

I imagine that Japanese man pages would need the same thing rather than UTF-8 
output.

(Note:  I know that the above method="html" works with an encoding.  I 
haven't confirmed or disproven that it works with method="text".)

-- 
Michael Westbay
Work: Beacon-IT http://www.beacon-it.co.jp/
Home:   http://www.seaple.icc.ne.jp/~westbay
Commentary: http://www.japanesebaseball.com/



Re: XSLT for text files ?(Re: DOCBOOK-APPS: XSL from DocBook refentry-> man)

2001-07-10 Thread Dave Pawson

At 12:49 AM 7/11/01, David Härdeman wrote:

>As a little training I did a (really quick and ugly hack so don't take it too 
>seriously) XSL stylesheet that should produce the correct output for the nologin 
>manpage (which is my testcase right now), the goal would be 'man 7 man' compliance on 
>a Linux box (note, I cleaned this up without checking that the cleaned up version 
>actually works, too far from my XSLT processor right now):

If you are in a java environment, a minor add-on to the stylesheet 
might be the use of line-wrapping. 

The code, from Eric, is xt based and works well.

http://4xt.org/downloads/examples/outputhandlers/formatedtext/

HTH DaveP





Re: XSLT for text files ?(Re: DOCBOOK-APPS: XSL from DocBook refentry-> man)

2001-07-10 Thread David Härdeman

Dan York wrote:


> So there we are... a CSV file from a XML file by way of an XSLT stylesheet.
> Not really overly useful, perhaps, but it was an interesting learning
> experiment I did.
> 
> I personally have never written a man page, so I don't know what's exactly
> involved... but this is the (very basic) way you could get a stylesheet going.
> 
> Regards,
> Dan
> 
> 


As a little training I did a (really quick and ugly hack so don't take 
it too seriously) XSL stylesheet that should produce the correct output 
for the nologin manpage (which is my testcase right now), the goal would 
be 'man 7 man' compliance on a Linux box (note, I cleaned this up 
without checking that the cleaned up version actually works, too far 
from my XSLT processor right now):

(Sorry for the length of the message)



http://www.w3.org/1999/XSL/Transform";>



 



 .TH 
 
  
 
  
 
 





 .SH NAME
 

 
  \- 
 
 





 .SH 
 
 

 



 



 
 
 .B 
 
 
.sp

 
 
 .I 
 
 

 
 



 
 




 .BR 
 
  "(
 
 )"








and the XML file would be something like:


http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";>



 
 NOLOGIN
 5
 "December 29 1992" "Linux" "Linux Programmer's 
Manual"
 

 
 nologin
 prevent non-root users from logging into the 
system
 

 
 DESCRIPTION
 
   If the file
   /etc/nologin
   exists,
   
 login
 1
   
   will allow access only to root. Other users will
   be shown the contents of this file and their logins refused.
 
 

 
 FILES
 
 /etc/nologin
 
 

 
 SEE ALSO
 
 
 login
 1
 
 ,
 
 shutdown
 8
 
 
 




So it can be done, question is how many ugly hacks will have to be 
madewell...thats another issuetime to go to bed

Regards,
David




Re: XSLT for text files ?(Re: DOCBOOK-APPS: XSL from DocBook refentry-> man)

2001-07-10 Thread Dave Pawson

At 07:41 PM 7/10/01, Norman Walsh wrote:
>/ Dave Pawson <[EMAIL PROTECTED]> was heard to say:
>| And if it falls down by needing some low count ASCII control code,
>| which is too much for XML, the typical solution is to 
>| output something careful such as [$nul], then use a text substitution
>| tool to convert that to null or whatever is needed.
>
>When does that happen? I haven't played much with text output, nor
>read that part of the spec recently, but I would have expected UTF-8
>text output to be able to handle any XML character.

Yes, but some text based formats use non XML characters.
The ones I've heard requested were less than 9 in an ASCII encoding?

Regards DaveP




Re: XSLT for text files ?(Re: DOCBOOK-APPS: XSL from DocBook refentry-> man)

2001-07-10 Thread Norman Walsh

/ Dave Pawson <[EMAIL PROTECTED]> was heard to say:
| And if it falls down by needing some low count ASCII control code,
| which is too much for XML, the typical solution is to 
| output something careful such as [$nul], then use a text substitution
| tool to convert that to null or whatever is needed.

When does that happen? I haven't played much with text output, nor
read that part of the spec recently, but I would have expected UTF-8
text output to be able to handle any XML character.

Be seeing you,
  norm

-- 
Norman Walsh <[EMAIL PROTECTED]>  | The way to get things done is not
http://www.oasis-open.org/docbook/ | to mind who gets the credit of
Chair, DocBook Technical Committee | doing them.--Benjamin Jowett



Re: XSLT for text files ?(Re: DOCBOOK-APPS: XSL from DocBook refentry-> man)

2001-07-10 Thread Dave Pawson

At 06:14 PM 7/10/01, Dan York wrote:

>I've been learning a whole lot about XSLT lately, so I couldn't let this one 
>pass by without comment.  Actually, going from XML to XML is *one* of the
>things that XSLT can do, but it is designed for much more.  In fact, the
> element has three defined methods:
>
>  
>  
>  

And if it falls down by needing some low count ASCII control code,
which is too much for XML, the typical solution is to 
output something careful such as [$nul], then use a text substitution
tool to convert that to null or whatever is needed.

HTH DaveP






XSLT for text files ?(Re: DOCBOOK-APPS: XSL from DocBook refentry ->man)

2001-07-10 Thread Dan York

Rafael,

> You can't use XSL stylesheets to generate man pages, not without a lot of
> klugery anyhow.  XSLT is designed to transform XML documents into other
> XML documents, and any attempt to make XSLT generate non-XML output is
> extremely troublesome, and in some cases XSLT will not allow you to make
> certain output constructions that you need to do because they violate the
> rules of XML.

I've been learning a whole lot about XSLT lately, so I couldn't let this one 
pass by without comment.  Actually, going from XML to XML is *one* of the
things that XSLT can do, but it is designed for much more.  In fact, the
 element has three defined methods:

  
  
  

To learn more, I wrote a rather lame stylesheet that would take an
XML file and write it out to a comma-separated-value file. For those
interested, the rest of this message gives that example.  For those
who are not, now would be a good time to stop reading this message. :-)

Okay, the goal was to take an XML file with a list of books and output
a CSV file with the title, author and publisher.

So I grabbed three books off my shelf and made a file called 'test.xml'
that just uses some XML elements I made up (no relation to any DTD I
know of) and looks like this:



  
Vi IMproved-Vim
Steve Oualline
New Riders
  
  
XSLT Programmer's Reference - 2nd Edition
Michael Kay
Wrox Press
  
  
DocBook: The Definitive Guide
Norman Walsh & Leonard Muellner
O'Reilly & Associates
  


Nothing overly fancy.  Just something simple.  Now here's a basic
XSLT stylesheet (csv.xsl) that processes this:

http://www.w3.org/1999/XSL/Transform";
  version = "1.0">





 


,,





Now there certainly might be better ways of doing this with XSLT, but
this was what I came up with.  The  element in the "book" template
was the only way I could figure out to get the end-of-line in there. I had
to put the  in there or I got the 
'' header on top of the file.

In any event, processing it with 'xsltproc' (from the 'libxslt' package
at http://www.xmlsoft.org/XSLT/ ) gets me the following:

$ xsltproc csv.xsl test.xml 
Vi IMproved-Vim,Steve Oualline,New Riders
XSLT Programmer's Reference - 2nd Edition,Michael Kay,Wrox Press
DocBook: The Definitive Guide,Norman Walsh & Leonard Muellner,O'Reilly &
Associates
$

(to dump it to a file, I did 'xsltproc -o test.csv csv.xsl test.xml'. The
'-o' is for the output file.)

So there we are... a CSV file from a XML file by way of an XSLT stylesheet.
Not really overly useful, perhaps, but it was an interesting learning
experiment I did.

I personally have never written a man page, so I don't know what's exactly
involved... but this is the (very basic) way you could get a stylesheet going.

Regards,
Dan

-- 
Dan York, Director of Training[EMAIL PROTECTED]
Ph: +1-613-751-4401  Mobile: +1-613-263-4312 Fax: +1-613-564-7739 
e-smith, inc. 150 Metcalfe St., Suite 1500, Ottawa,ON K2P 1P1 Canada
http://www.e-smith.com/open source, open mind



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-10 Thread Norman Walsh

/ "Rafael R. Sevilla" <[EMAIL PROTECTED]> was heard to say:
| You can't use XSL stylesheets to generate man pages, not without a lot of
| klugery anyhow.  XSLT is designed to transform XML documents into other
| XML documents, and any attempt to make XSLT generate non-XML output is
| extremely troublesome, and in some cases XSLT will not allow you to make
| certain output constructions that you need to do because they violate the
| rules of XML.

XSLT supports output to text files in addition to XML, so converting
to *roff is within the realm of possibility. Just how hard it is to do
is going to depend greatly on how unconstrained you allow the input
refentrys to be.

Be seeing you,
  norm

-- 
Norman Walsh <[EMAIL PROTECTED]>  | certain: adj., insufficiently
http://www.oasis-open.org/docbook/ | analyzed
Chair, DocBook Technical Committee |



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-10 Thread Bart Schuller

On Tue, Jul 10, 2001 at 10:38:05AM +0800, Rafael R. Sevilla wrote:
> You can't use XSL stylesheets to generate man pages, not without a lot of
> klugery anyhow.  XSLT is designed to transform XML documents into other
> XML documents, and any attempt to make XSLT generate non-XML output is
> extremely troublesome, and in some cases XSLT will not allow you to make
> certain output constructions that you need to do because they violate the
> rules of XML.

However, defining an XML vocabulary and writing a simple SAX filter to
map to the real *roff syntax is fun and the right way to do it.

-- 
The idea is that the first face shown to people is one they can readily
accept - a more traditional logo. The lunacy element is only revealed
subsequently, via the LunaDude. [excerpted from the Lunatech Identity Manual]



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-09 Thread Rafael R. Sevilla


On Mon, 9 Jul 2001, David Hardeman wrote:

> On Mon, Jul 09, 2001 at 09:09:40AM +0200, Jirka Kosek wrote:
> > > any XSL stylesheets to convert refEntry DocBook documents to man pages?
> >
> > Look at http://docbook2x.sf.net
>
> Yes, but those tools were perl tools as far as I could understand, I'm
> looking for "true" XSL stylesheets (thinking about writing them
> myself, just want to make sure that no such sheets already exist
> first)
>

You can't use XSL stylesheets to generate man pages, not without a lot of
klugery anyhow.  XSLT is designed to transform XML documents into other
XML documents, and any attempt to make XSLT generate non-XML output is
extremely troublesome, and in some cases XSLT will not allow you to make
certain output constructions that you need to do because they violate the
rules of XML.

--
Rafael R. Sevilla <[EMAIL PROTECTED]>   +63(2)   8177746 ext. 8311
Programmer, InterdotNet Philippines  +63(917) 4458925
http://dido.engr.internet.org.ph/

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GAT d- s:- a- C UL+++ P+++ L+++ E++ W++ N+ o K- w---
O- M-- V- PS+ PE Y+ PGP++ t+ 5 X+ R tv+ b+++ DI++ D+
G e++ h! r++ y+
--END GEEK CODE BLOCK--




Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-09 Thread Norman Walsh

/ David Hardeman <[EMAIL PROTECTED]> was heard to say:
| On Mon, Jul 09, 2001 at 08:11:42AM -0400, Norman Walsh wrote:
| >> | openjade:/usr/local/share/sgml/docbook/dsssl/html/dblink.dsl:406:5:E:
| >> | undeclared use of feature "simple-page"
| > 
| > Do you have a customization layer that's trying to use
| > element-page-number-sosofo? Page numbers don't make any sense in HTML.
|
| I'm not using any customization at all (no -V commands to jade and
| no customized files, just plain DSSSL stylesheets). I've done some
| digging on the web for this and found that this bug is reported with
| the debian linux distro as well (see
| http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92738&repeatmerged=yes
| for details).

Ok, I grabbed the document mentioned in the bug report. It formats
fine for me. I now think this is an OpenJade bug. (I've never seen it
with Jade.)

If you can provide a test case that demonstrates otherwise, please do. :-)

Be seeing you,
  norm

-- 
Norman Walsh <[EMAIL PROTECTED]>  | Graduate school is where you learn
http://www.oasis-open.org/docbook/ | to call a spade a leveraged
Chair, DocBook Technical Committee | tactile-feedback geomass delivery
   | system.--Martha Koester



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-09 Thread David Härdeman

On Mon, Jul 09, 2001 at 08:11:42AM -0400, Norman Walsh wrote:
> | openjade:/usr/local/share/sgml/docbook/dsssl/html/dblink.dsl:406:5:E:
> | undeclared use of feature "simple-page"
> 
> Do you have a customization layer that's trying to use
> element-page-number-sosofo? Page numbers don't make any sense in HTML.

I dont have any customizations, neither as -V arguments to jade or in any files, I'm 
running the "vanilla" DSSSL stylesheets. Upon searching the web some more I came up 
with this debian bug report 
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92738&repeatmerged=yes) which talks 
about the exact same problem that I'm having...any more ideas?

//David
[EMAIL PROTECTED]



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-09 Thread David Hardeman

On Mon, Jul 09, 2001 at 08:11:42AM -0400, Norman Walsh wrote:
>> | openjade:/usr/local/share/sgml/docbook/dsssl/html/dblink.dsl:406:5:E:
>> | undeclared use of feature "simple-page"
> 
> Do you have a customization layer that's trying to use
> element-page-number-sosofo? Page numbers don't make any sense in HTML.
> 

I'm not using any customization at all (no -V commands to jade and no customized 
files, just plain DSSSL stylesheets). I've done some digging on the web for this and 
found that this bug is reported with the debian linux distro as well (see 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92738&repeatmerged=yes for details).

//David
[EMAIL PROTECTED]



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-09 Thread David Hardeman

On Mon, Jul 09, 2001 at 09:09:40AM +0200, Jirka Kosek wrote:
> > any XSL stylesheets to convert refEntry DocBook documents to man pages?
> 
> Look at http://docbook2x.sf.net

Yes, but those tools were perl tools as far as I could understand, I'm looking for 
"true" XSL stylesheets (thinking about writing them myself, just want to make sure 
that no such sheets already exist first)

//David
[EMAIL PROTECTED]



Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-09 Thread Norman Walsh

/ David Härdeman <[EMAIL PROTECTED]> was heard to say:
| openjade:/usr/local/share/sgml/docbook/dsssl/html/dblink.dsl:406:5:E:
| undeclared use of feature "simple-page"

Do you have a customization layer that's trying to use
element-page-number-sosofo? Page numbers don't make any sense in HTML.

Be seeing you,
  norm

-- 
Norman Walsh <[EMAIL PROTECTED]>  | All knowledge is of itself of some
http://www.oasis-open.org/docbook/ | value. There is nothing so minute
Chair, DocBook Technical Committee | or inconsiderable, that I would
   | not rather know it than not.--Dr.
   | Johnson




Re: DOCBOOK-APPS: XSL from DocBook refEntry -> man

2001-07-08 Thread Jirka Kosek

David Härdeman wrote:

> I'm wondering (cause I couldn't find any mentioning of it in the
> archives or in the XSL sheets made by Norman Walsh) if anyone has made
> any XSL stylesheets to convert refEntry DocBook documents to man pages?
> (it does seem strange if noone had done it before). If not, I'd be happy
> to start working on such a sheet.

Look at http://docbook2x.sf.net
 

-
  Jirka Kosek
  e-mail: [EMAIL PROTECTED]
  http://www.kosek.cz