Re: DOCBOOK-APPS: Experiences as Authors

2002-11-29 Thread Arno Sosna
 Original Message 
From: Stephan Wiesner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 29, 2002 8:19 AM
Subject: RE: DOCBOOK-APPS: Experiences as Authors

 Hi Arno,
 Doesn't the use of xinclude make the writing hard? Like I write
 chapter
 one and want to reference chapter two. My editor would have to
 resolve
 the xlink in order to validate that link. It can't do that, so I
 would
 have to switch the editor?

 Stephan

Xincludes are only used inside the book-files, which are basically empty. we
use xmlint to put the books together and transform them afterwards with
saxon. if, say, the glossary file is not present saxon throws some errors,
if it is present the links are resolved correctly.

but you are right, this point involves a discipline from the authors and
strict naming guidelines for the ids.

hth,
arno sosna




Re: DOCBOOK-APPS: Experiences as Authors

2002-11-29 Thread Arno Sosna
 Any chance this tool can be made available to the outside world,
 either
 Free, free or commercial?

yes, i am planning to release it for free in the next couple of weeks. it is
not very spectacular, but it does its job and all the authors are quite
happy with it. the underlying tools are all open-source (saxon, xmlint,
...).

it's only for win32 platforms and if you have ms word 2000 installed you can
even generate pretty good looking .doc output (rtf and all other word
formats too).

i'll anounce it via this list.

wbr,
arno sosna




Re: DOCBOOK-APPS: Experiences as Authors

2002-11-28 Thread Arno Sosna
 Original Message 
From: Stephan Wiesner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 28, 2002 7:53 PM
Subject: DOCBOOK-APPS: Experiences as Authors

 Hi list,
 I would like to get some feedback on how others actually write their
 documents. And I don't mean those with one or two DocBook documents,
 but
 those with tons of them.

 Of special interest is: how do you handle stuff that reappears like
 biblioentries, glossary, quotes, about the author. How do you keep
 it up
 to date if it is included/refrenced in different documents.


 To get started, I will now describe how I do it. However, otherwise I
 would not write this mail, I am not really happy with this.

 I wrote a tool that helps me manage my glossary, bibliography and
 blockquotes and just copy those elements I need to a new document.
 This
 works very good, except when I have to change something and have to
 find
 all documents including those elements. I could just reference them
 instead of inclusion, with entities for example, but then I might
 have a
 lot of work if I switch to a different computer.


 Any comments are appreciated

 Stephan

we use modular books, by using xinclude syntax. the physical files contain
single chapters, appendices, etc. xinclude is a great thing, as it allows
pretty fine grained control over the parts being included into the final
book. all the chapters themselves are valid docbook documents.

the next step for us is setting up version control system.

editing is done via xml spy, the whole transformation process is managed via
a self-written win32 environment with an gui.

wbr,
arno sosna




Re: DOCBOOK-APPS: profiling swallows informaltable

2002-10-18 Thread Arno Sosna
 Original Message 
From: Jirka Kosek [EMAIL PROTECTED]
To: Arno Sosna [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 16, 2002 9:03 PM
Subject: Re: DOCBOOK-APPS: profiling swallows informaltable

| Arno Sosna wrote:
|
|| BUT: i have an informaltable inside an example. the example is in
|| the html-output, but the informaltable is simply missing. the
|| informaltable isn't inside a optional part, i.e. should be seen
|| for all roles.
||
|| i even tried the profiling for fo output - same effect.
|| without profiling everything is present in the output (all formats).
|
| If you could provide some short document which demonstrates the
| problem,
| we might investigate further.
|
| Jirka

hi jirka + list,

it took a while to craft an example, but here it is. attached you'll find a
simple docbook chapter containing an informaltable and three paragraphs, two
of them with role attributes.

i've used the xhtml\profile-docbook.xsl stylesheet with two parameters:
base.dir and html.stylesheet.

i used saxon 6.5.2 with this command line option: profile.role=web

the output is xhtml, but the informaltable is missing. the div
class='informaltable' and the a tag with the id is there - but the rest is
missing.
without profiling everything is fine.

thanks for your help,
arno sosna


?xml version=1.0 encoding=UTF-8?
!DOCTYPE chapter PUBLIC -//OASIS//DTD DocBook V4.2//EN 
	..\tools\DocBookXML4_2\xml\docbookx.dtd
chapter id=man lang=en
	titleSome Manual/title
	informaltable id=man_tab
		tgroup role=test cols=3
			colspec colname=top/
			colspec colname=middle/
			colspec colname=bottom/
			tbody
row
	entry morerows=7foo/entry
	entry namest=middle nameend=bottombar/entry
/row
row
	entry morerows=1foo/entry
	entrybar/entry
/row
row
	entryfoo/entry
/row
row
	entry morerows=1bar/entry
	entryfoo/entry
/row
row
	entrybar/entry
/row
row
	entry morerows=1foo/entry
	entrybar/entry
/row
row
	entryfoo/entry
/row
			/tbody
		/tgroup
	/informaltable
	para role=localThis is text for the role local./para
	para role=webThis is text for the role web./para
	paraThis text is for both roles/para
/chapter



Re: DOCBOOK-APPS: profiling swallows informaltable

2002-10-18 Thread Arno Sosna
 Original Message 
From: Jirka Kosek [EMAIL PROTECTED]
To: Arno Sosna [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, October 18, 2002 2:10 PM
Subject: Re: DOCBOOK-APPS: profiling swallows informaltable

| Arno Sosna wrote:
|
|
|| it took a while to craft an example, but here it is. attached
|| you'll find a simple docbook chapter containing an informaltable
|| and three paragraphs, two of them with role attributes.
|
| The problem is, that you have role=test on your tgroup. This is
| probably unintended typo, but it results in omitting table in your
| output, if you don't profile for test value.
|
| Jirka
|
| BTW: Setting Reply-To to Arno Sosna [EMAIL PROTECTED]
| isn't very helpful if you want quick response.
|

damn, i am a moron.

thanks a lot and sorry for my incorrect reply-address, i use it for postings
in newsgroups too. it is correct now.

wbr,
arno sosna




DOCBOOK-APPS: profiling swallows informaltable

2002-10-16 Thread Arno Sosna

hi list,

i am using the profile-chunk stylesheet for profiling. the profiling itself
works like a charm, saxon only outputs the desired sections.

BUT: i have an informaltable inside an example. the example is in the
html-output, but the informaltable is simply missing. the informaltable
isn't inside a optional part, i.e. should be seen for all roles.

i even tried the profiling for fo output - same effect.
without profiling everything is present in the output (all formats).

has anybody encountered a similar problem?

i am using docbook xsl 1.56.1, saxon 6.5.2 on a win2k machine.

thanks for your help,
arno sosna




DOCBOOK-APPS: colwidth problem with instant saxon 6.5.2

2002-09-30 Thread Arno Sosna

hello,
i have a problem concerning the colwidth attribute. when i
set it, i get following error at transformation:

No adjustColumnWidths function available.
Processing terminated by xsl:message at line 337

i have set following parameters in my driver stylesheet:
xsl:param name=saxon.extensions select=1/
xsl:param name=use.extensions select=1/
xsl:param name=tablecolumns.extension select=1/

i use instant_saxon 6.5.2 with docbook-xsl-1.55.0 (xml-4.2)
on a win2k machine.

has anybody encountered a similar problem (and solved it)?

wbr,
arno sosna

p.s. i noticed, that xhtml/chunk.xsl contains following
lines:
xsl:import
href=http://docbook.sourceforge.net/release/xsl/current/htm
l/docbook.xsl/
xsl:import
href=http://docbook.sourceforge.net/release/xsl/current/htm
l/chunk-common.xsl/

why is it referencing to /html not /xhtml? i redirected it
correctly in my catalog-file, but am still wondering, if it
makes a difference.




RE: DOCBOOK-APPS: modular docbook documents using xpointer

2002-09-27 Thread Arno Sosna

 -Original Message-
 From: Daniel Veillard [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 26. September 2002 10:52
 To: Jirka Kosek
 Cc: Bob Stayton; Arno Sosna; '[EMAIL PROTECTED]'
 Subject: Re: DOCBOOK-APPS: modular docbook documents using xpointer
 
 
 On Thu, Sep 26, 2002 at 10:29:13AM +0200, Jirka Kosek wrote:
  Bob Stayton wrote:
  
Use #xpointer(//*[not(ancestor-or-self::chapterinfo)])
   
What is nice on XPath is that you never know it enough ;-)
   
   Did this XPath actually work for you?
  
  I was writing it from top of my head, I though it will work 
 as XPointer
  is superset of XPath. My xsltproc doesn't signal error, but 
 for every
  node selected by this expression returns also its subtree 
 resulting in
  messy output. It means that either XPointer semantic in context of
  XInclude is defferent than I though or that there is error 
 in xsltproc.
  Maybe DV can put some light in this area.
 
   Because they select the top-level-included-items and what gets 
 produced in the result tree are all the subtrees under tose selected
 nodes. No change in semantic at the XPointer level, just a 
 misunderstanding
 of the XInclude specification. Please read it :-)
http://www.w3.org/TR/xinclude/#dt-top-level-included-items

so basically it means, that the error is in the syntax, not the tool, am i
right?

which leads me back to the problem of not knowing how to do it :-)
well, i guess back to xpath/xpointer...

arno sosna 





RE: DOCBOOK-APPS: modular docbook documents using xpointer

2002-09-27 Thread Arno Sosna

 -Original Message-
 From: Daniel Veillard [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 26. September 2002 11:23
 To: Arno Sosna
 Cc: Jirka Kosek; Bob Stayton; '[EMAIL PROTECTED]'
 Subject: Re: DOCBOOK-APPS: modular docbook documents using xpointer
 
 
 On Thu, Sep 26, 2002 at 11:08:06AM +0200, Arno Sosna wrote:
 Because they select the top-level-included-items and what gets 
   produced in the result tree are all the subtrees under 
 tose selected
   nodes. No change in semantic at the XPointer level, just a 
   misunderstanding
   of the XInclude specification. Please read it :-)
  http://www.w3.org/TR/xinclude/#dt-top-level-included-items
  
  so basically it means, that the error is in the syntax, not 
 the tool, am i
  right?
 
   Well in this case this doesn't seems a bug in the implementation :-)
 
  which leads me back to the problem of not knowing how to do it :-)
  well, i guess back to xpath/xpointer...
 
   It may actually be difficult to do filtering out operations with
 XInclude + XPointer. Seems such an operation is more easily 
 done further
 in the processing chain for example by skipping the elements 
 at the XSLT
 level.

well, my 'workaround' in the book-file looks like this (i think i've posted
it before):

chapter
xi:include xmlns:xi=http://www.w3.org/2001/XInclude; 

href=chapter.xml#xpointer(/chapter/*[not(descendant-or-self::chapterinfo)])

xi:fallback
para
emphasischapter.xml
missing./emphasis
/para
/xi:fallback
/xi:include
/chapter

under the toplevel it is much easier to do filtering. it might be a not
very elegant solution, but for now it suits my needs.

well, thanks for your help,
arno sosna



RE: DOCBOOK-APPS: modular docbook documents using xpointer

2002-09-27 Thread Arno Sosna

 -Original Message-
 From: Bob Stayton [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 26. September 2002 07:38
 To: Jirka Kosek; Arno Sosna
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: DOCBOOK-APPS: modular docbook documents using xpointer
 
 
 On Tue, Sep 24, 2002 at 11:03:04PM +0200, Jirka Kosek wrote:
  Arno Sosna wrote:
  
   xi:include xmlns:xi=http://www.w3.org/2001/XInclude;
   
 href=chapter.xml#xpointer(/chapter/*[not(descendant-or-self::
 chapterinfo)])
   
  
  Use #xpointer(//*[not(ancestor-or-self::chapterinfo)])
  
  What is nice on XPath is that you never know it enough ;-)
 
 Did this XPath actually work for you?
 I get an error when I try this expression with xsltproc --xinclude:
 
 Error Invalid expression
 
 xsltproc --version:
 Using libxml 20424, libxslt 10020 and libexslt 711
 xsltproc was compiled against libxml 20424, libxslt 10020
 libxslt 10020 was compiled against libxml 20424

well, it works technically - xmllint throws no error (i don't use xsltproc,
just use xmllint to merge my book).
the output however, was a horrible mess (chapter inside chapter,...). i
think, that xmllint has problems with slightly more complex xpath
statements.

wbr,
arno sosna



DOCBOOK-APPS: modular docbook documents using xpointer

2002-09-24 Thread Arno Sosna

hello,

i have divided a book-file physically into separate files
and merge it using xinclude.

in the bookfile:
xi:include xmlns:xi=http://www.w3.org/2001/XInclude; 
  href=chapter_dep.xml
 xi:fallback
para
emphasischapter_dep.xml missing./emphasis
/para
 /xi:fallback
/xi:include

the part above includes a chapter, which lies in a separate file. 
the chapterfile is also a valid docbook document. simplified syntax:

chapter
   chapterinfo
   author, revisionhistory,...
   /chapterinfo
   titlefoo/title
   sect1.../sect1
/chapter

now i want to use xpath to choose just
some parts of the files, or to be exact, i want to exclude
certain elements and their sibblings (the whole
chapterinfo-block from chapter).

so far, i have developed following syntax:

xi:include xmlns:xi=http://www.w3.org/2001/XInclude;
href=chapter.xml#xpointer(/chapter/*[not(descendant-or-self::chapterinfo)])


this outputs all elements WITHIN chapter except the elements enclosed in
chapterinfo, which is not bad, but still not complete, as the chapter
tags are not reached by this. they have to present, without them the
book-file is not valid (naturally). [workaround: i insert the missing tags
into my book-file by hand.]

i'd like to have following output format:

chapter
   titlefoo/title
   sect1.../sect1
.
.
.
/chapter

what seems like a simple step is causing me real headaches. has anybody a
solution for this? or am i going the completly wrong way and there is a much
simpler way to achieve selective output?

i use xmllint from libxml2 on a win2k machine for xinclude. 

thanks a lot,
arno sosna