Next in thread → Next in month →

Re: [docbook-apps] XSLT failure on DocBook table

From
"Cob Rtayton"
Date
2004-07-16T15:33:20+00:00
ID
04fa01c46b4a$f55c37f0$6401a8c0@toshiro
Thread
Re: [docbook-apps] XSLT failure on DocBook table
Title: AW: [docbook-apps] XSLT failure on DocBook table

I meant to say you should use the 
profiling/profile.xsl stylesheet first. See:

 

http://www.sagehill.net/docbookxsl/AlternateText.html#ProfileFilter

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

  
----- Original Message ----- 

  
From: 
  Johannes Paul 
  

  
To: 'Bob Stayton' 

  
Cc:  
  

  
Sent: Friday, July 16, 2004 8:26 AM

  
Subject: AW: [docbook-apps] XSLT failure 
  on DocBook table

  

  
Hi Bob, 

  
thanks for the explanation. 
I'm also 
  experiencing problems when using xsltproc with profiling. 
Since I'm new to docbook, I was looking in my files for the reason why 
  the output was differnt in html and in pdf. 
Now I 
  tried the test files without the profiling and the output is the same for html 
  and pdf. So it's probably not a problem with my files but really with 
  xsltproc.

  
Regarding your solution, I still have a question. You say that 
  one should first use the profile stylesheet and then the regular stylesheets 
  on the result of that step. As far as I found out by now, I receive a 
  different output format when processing my xml file. So how can I use the 
  regular stylesheets afterwards?

  
E.g. when I first run 

  
xsltproc -o simpletest.fo --stringparam profile.condition 
  "4.3" c:/xml/docbook42/docbook-xsl/fo/profile-docbook.xsl 
  simpletest.xml

  
, I don't have a "shorter" xml-file afterwards but the 
  resulting .fo file (which probably contains the problems already). How can I 
  use the regular stylesheets on that .fo file?

  
Or is there a way to get a "shortened" xml-file as the result 
  of the profiling? By "shortened", I mean one where all the parts that do not 
  match the condition are omitted.

  
All this is still very new to me, so I'm feeling a bit lost. 
  ;-) 

  
Thanks for any hints. 

  
Johannes 

  
-----Ursprüngliche Nachricht----- 
Von: 
  Bob Stayton [mailto:] 
Gesendet: Donnerstag, 15. Juli 2004 17:47 
An: 
  Joost van Dijk; Jirka Kosek 
Cc: John L. Clark; 
   
Betreff: Re: 
  [docbook-apps] XSLT failure on DocBook table 

  
The problem with using the profile-docbook.xsl stylesheet with 
  xsltproc is 
not going to be fixed in any version, 
  according to the program's author. The 
integrated 
  stylesheet relies on the exsl node-set() extension function, and 
  
the author has a different (and valid) opinion on how that 
  extension can be 
safely implemented since it is not as 
  well defined as the XSLT 
specification. 

  
As Jirka suggested, if you need profiling and you are using 
  xsltproc, you 
should use the separate profile.xsl 
  stylesheet first, and then the regular 
docbook.xsl 
  stylesheets on the result of that step. 

  
Bob Stayton 
Sagehill 
  Enterprises 
DocBook Consulting 
 

  
----- Original Message ----- 
From: 
  "Joost van Dijk" <> 
To: "Jirka 
  Kosek" <> 
Cc: "John L. Clark" 
  <>; 
<>; "Bob Stayton" 
  <> 
Sent: Friday, July 09, 2004 
  6:31 AM 
Subject: Re: [docbook-apps] XSLT failure on 
  DocBook table 

  
> On Thu, Feb 26, 2004 at 09:21:31AM +0100, Jirka Kosek 
  wrote: 
> > John L. Clark wrote: 
> > 
> > >After a bit more 
  debugging, I realized that I didn't include all the 
> > >necessary information.  This error is triggered by 
  using the one-pass 
> > >profile-docbook.xsl 
  style sheet. 
> > 
> 
  > Well, this stylesheet doesn't always work with xsltproc. Could you 
  try 
> > process your document with Saxon or with 
  non-profiling stylesheet by 
> > xsltproc? 
  
> > 
> > Jirka 
  
> 
> I have a similar problem in 
  some generated docbook code... 
> Has anyone found 
  out what the problem is ? 
> 
> Using the sample code earlier in this thread applied to the 
  profiling 
> FO stylesheet, combined with the most 
  recent version of xsltproc 
> (from libxsl 1.1.8 / 
  libxml2 2.6.11) and docbook-xsl (1.65.1), I 
> get 
  exactly the same error message: 
> 
> $ ./xsltproc -o /dev/null --stringparam profile.lang en 
  
docbook-xsl-1.65.1/fo/profile-docbook.xsl debug.doc 
  
> Making portrait pages on USletter paper 
  (8.5inx11in) 
> XPath error : Invalid context 
  position 
> xmlXPathCompiledEval: evaluation 
  failed 
> 
> whilst 
  everything is fine when I use the non-profiling stylesheet: 
> 
> $ ./xsltproc -o /dev/null 
  docbook-xsl-1.65.1/fo/docbook.xsl debug.doc 
> 
  Making portrait pages on USletter paper (8.5inx11in) 
> 
> For the debug.doc code, see: 
  
> http://lists.oasis-open.org/archives/docbook-apps/200402/msg00302.html 
  
> 
> I think it may be a problem 
  with xsltproc, while xalan (xalan-j_2_6_0 
> to be 
  precise) does not complain using the same inputs... 
> (I have to rely on xsltproc though...) 
> 
> Saxon 8.0B doesn't seem to like 
  things either, profiled or not, but 
> seemingly for 
  different reasons: 
> 
> $ 
  java -jar saxon8.jar debug.doc docbook-xsl-1.65.1/fo/docbook.xsl 
  
> Warning: at xsl:param on line 220 of 
  file:docbook-xsl-1.65.1/lib/lib.xsl: 
>   
  Warning in {processing-instruction('')}: 
>     No processing instruction will ever be 
  named ''. Invalid QName {} 
> Warning: at xsl:when 
  on line 209 of 
file:docbook-xsl-1.65.1/common/table.xsl: 
>   Less-than and greater-than comparisons between strings 
  have changed 
since XPath 1.0 
> Error at xsl:call-template on line 149 of 
file:docbook-xsl-1.65.1/fo/block.xsl: 
>   Parameter title is not declared in the called 
  template 
> Error at xsl:call-template on line 184 
  of 
file:docbook-xsl-1.65.1/fo/titlepage.xsl: 
  
>   Parameter title is not declared in the 
  called template 
> Error at xsl:call-template on 
  line 402 of 
file:docbook-xsl-1.65.1/fo/titlepage.xsl: 
>   Parameter title is not declared in the called 
  template 
> Transformation failed: Failed to compile 
  stylesheet. 3 errors detected. 
> 
> Any ideas? 
> 
> For completeness: 
> 
> $ xsltproc -V 
> Using libxml 20611, 
  libxslt 10108 and libexslt 806 
> xsltproc was 
  compiled against libxml 20611, libxslt 10108 and libexslt 806 
> libxslt 10108 was compiled against libxml 20611 
> libexslt 806 was compiled against libxml 20611 
> 
> Thanks, 
> 
  --Joost 
> 
> Joost van 
  Dijk 
  <>                 
  |_   _|   _ _ __ (_)_  __ 
> TUNIX Internet Security & 
  Opleidingen              
  | || | | | '_ \| \ \/ / 
> Wijchenseweg 111, 6538 SW 
  Nijmegen, Netherlands    | || |_| | | | | |>  
  < 
> phone: +31-(0)24-3455000 / fax: 
  +31-(0)24-3455001  |_| \__,_|_| |_|_/_/\_\ 
> 

  
To unsubscribe from this list, send a post to 
  , or visit http://www.oasis-open.org/mlmanage/.
Next in thread → Next in month →