List Info

Thread: pdf image source path no longer working?




pdf image source path no longer working?
user name
2007-08-27 09:23:23
Hello,

is this the right place to report (suspected) bugs?

While upgrading the docbook stylesheets from v1.72.0 to
1.73.1 I
noticed that my custom fo-parameter "img.src.path"
stopped working.

My xsl-fo parameter-stylesheet has a line like this:

[...]
 <xsl:param
name="img.src.path">../</xsl:param>
[...]

This used to work as expected (find pdf-images one directory
level
upwards), but since upgrading to 1.73.1, images in PDFs are
now
missing.

thanks,
Claus

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


Re: pdf image source path no longer working?
user name
2007-08-27 09:48:48
Claus <claus.klingberggmail.com>, 2007-08-27
16:23 +0200:

> is this the right place to report (suspected) bugs?

It's fine to report them here first. But if nobody follows
up with
a solution on the list, the best thing to do is to open a
new bug
report for this issue, which you can do here:

  http://docbo
ok.sf.net/tracker/submit/bug

> While upgrading the docbook stylesheets from v1.72.0 to
1.73.1 I
> noticed that my custom fo-parameter
"img.src.path" stopped working.

As part of the bug report you submit, please upload/attach a
copy
of your DocBook XML source file (or some minimal document
that
exhibits the same problem), along with your customization
layer
(if possible).

I looked through the diffs for all changes we made between
the
1.72.0 and 1.73.1 release, but I can't see any change that
would
cause the problem you've described. So we need to have a
sample
doc to test with to see if we can reproduce the problem.

  --Mike

-- 
Michael(tm) Smith
http://people.w3.org/mike/

http://sideshowbarker.net/

Re: pdf image source path no longer working?
user name
2007-08-28 23:16:11
Claus <claus.klingberggmail.com>, 2007-08-27
16:23 +0200:

> While upgrading the docbook stylesheets from v1.72.0 to
1.73.1 I
> noticed that my custom fo-parameter
"img.src.path" stopped working.
> 
> My xsl-fo parameter-stylesheet has a line like this:
> 
> [...]
>  <xsl:param
name="img.src.path">../</xsl:param>
> [...]
> 
> This used to work as expected (find pdf-images one
directory level
> upwards), but since upgrading to 1.73.1, images in PDFs
are now
> missing.

I've now run some test cases with both the 1.72.0 and
1.73.1
stylesheets, using "../" and various other values
for the
img.src.path param, but I'm not able to reproduce the
problem you
describe. In every case, I get identical output, with the
images
appearing as expected.

But it could well be that my test cases are not modeling
what you
have. So, as I mentioned in my earlier message, if you
could
send/upload a copy of your DocBook source or some other file
that
with which you're able to reproduce this problem, along with
a
copy of you customization layer, I can also check with that
and
see what I get.

Also note that you can get DocBook help in real time on the
#docbook channel on irc.freenode.net

  --Mike

-- 
Michael(tm) Smith
http://people.w3.org/mike/

http://sideshowbarker.net/

Re: pdf image source path no longer working?
user name
2007-08-31 05:05:08
One more point I discovered just now (including
debug-output):

I receive the following warnings when compiling using
xsltproc with
v1.73.1 (no warnings with version < 1.72.x):

% xsltproc c:/work/docbook/my_docbook-fo-driver.xsl
UC-importing-web-style.xml

[...]
Note: namesp. cut : stripped namespace before processing    
      UC:
Importieren von Daten über Webinterface
Warn: no xml:base: cannot add xml:base to node-set root
element  UC:
Importieren von Daten über Webinterface
Warn: no xml:base: relative paths may not work                
   UC:
Importieren von Daten über Webinterface
Note: namesp. cut : processing stripped document            
      UC:
Importieren von Daten über Webinterface
[...]

Perhaps this gives some hint of what might go wrong?

% xsltproc --version
Using libxml 20628, libxslt 10120 and libexslt 813
xsltproc was compiled against libxml 20628, libxslt 10120
and libexslt 813
libxslt 10120 was compiled against libxml 20628
libexslt 813 was compiled against libxml 20628

% head UC-importing-web-style.xml
<?xml version="1.0"
encoding="utf-8"?>
<article xmlns="http://docbook.or
g/ns/docbook"
xmlnsl=&qu
ot;http://www.w3.org/
1999/xlink" version="5.0"
xml:lang="de"
class="specification">
  <title>UC: Importieren von Daten über
Webinterface</title>
 
<subtitle>UC-importing-web-style.html</subtitle>

  <info>
    <date>27.08.2007</date>
[...]

%cat c:/work/docbook/my_docbook-fo-driver.xsl

<xsl:stylesheet xmlnssl=&q
uot;http://www
.w3.org/1999/XSL/Transform"
                version="1.0">
  <xsl:import
href="docbook-xsl-1.73.1/fo/docbook.xsl"/>
  <xsl:param name="draft.watermark.image"
select="''"/>
  <xsl:param name="xep.extensions"
select="1"/>

  <xsl:param name="paper.type"
select="'A4'"/>
  <xsl:param name="preferred.mediaobject.role"
select="fo"/>
  <xsl:param
name="body.font.master">12</xsl:param>

  <xsl:param
name="show.revisionflag">1</xsl:param>
  <xsl:param name="ulink.show"
select="1"></xsl:param>

  <xsl:param
name="page.margin.inner">1in</xsl:param>
  <xsl:param
name="l10n.gentext.default.language"
select="'de'"></xsl:param>

  <xsl:param
name="img.src.path">../</xsl:param>

</xsl:stylesheet>

Claus



On 8/29/07, Michael(tm) Smith <smithsideshowbarker.net> wrote:
> Claus <claus.klingberggmail.com>, 2007-08-27
16:23 +0200:
>
> > While upgrading the docbook stylesheets from
v1.72.0 to 1.73.1 I
> > noticed that my custom fo-parameter
"img.src.path" stopped working.
> >
> > My xsl-fo parameter-stylesheet has a line like
this:
> >
> > [...]
> >  <xsl:param
name="img.src.path">../</xsl:param>
> > [...]
> >
> > This used to work as expected (find pdf-images one
directory level
> > upwards), but since upgrading to 1.73.1, images in
PDFs are now
> > missing.
>
> I've now run some test cases with both the 1.72.0 and
1.73.1
> stylesheets, using "../" and various other
values for the
> img.src.path param, but I'm not able to reproduce the
problem you
> describe. In every case, I get identical output, with
the images
> appearing as expected.
>
> But it could well be that my test cases are not
modeling what you
> have. So, as I mentioned in my earlier message, if you
could
> send/upload a copy of your DocBook source or some other
file that
> with which you're able to reproduce this problem, along
with a
> copy of you customization layer, I can also check with
that and
> see what I get.
>
> Also note that you can get DocBook help in real time on
the
> #docbook channel on irc.freenode.net
>
>   --Mike
>
> --
> Michael(tm) Smith
> http://people.w3.org/mike/

> http://sideshowbarker.net/

>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


Re: pdf image source path no longer working?
user name
2007-08-31 04:27:51
Michael,

thanks for looking into this.

I'm using XEP for PDF-creation and perhaps the error is
caused by XEP.

I'll investigate some more and will try to create a minimal
test to
reproduce this.

Claus

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


Re: pdf image source path no longer working?
user name
2007-08-31 08:11:51
Claus <claus.klingberggmail.com>, 2007-08-31
11:27 +0200:

> I'm using XEP for PDF-creation and perhaps the error is
caused by XEP.

Actually, of all the possible causes, that seems to me to
most
unlikely. I use XEP also and though I know it has some bugs
I have
never personally come across any of them myself.

I think the cause is much more likely either something in
the
stylesheets or in your customization layer or in your
markup.

> I'll investigate some more and will try to create a
minimal test to
> reproduce this.

Thanks

  --Mike

-- 
Michael(tm) Smith
http://people.w3.org/mike/

http://sideshowbarker.net/

Re: pdf image source path no longer working?
user name
2007-08-31 08:23:04
CLAUS <CLAUS.KLINGBERGGMAIL.COM>, 2007-08-31
12:05 +0200:

> I RECEIVE THE FOLLOWING WARNINGS WHEN COMPILING USING
XSLTPROC WITH
> V1.73.1 (NO WARNINGS WITH VERSION < 1.72.X):
> 
> % XSLTPROC C:/WORK/DOCBOOK/MY_DOCBOOK-FO-DRIVER.XSL
UC-IMPORTING-WEB-STYLE.XML
> 
> NOTE: NAMESP. CUT : STRIPPED NAMESPACE BEFORE
PROCESSING           UC:
> IMPORTIEREN VON DATEN üBER WEBINTERFACE

THE ABOVE IS A NOTE, NOT A WARNING. IT IS JUST THERE TO LET
YOU
KNOW THAT YOUR SOURCE IS A NAMESPACED (DOCBOOK 5) DOCUMENT,
BUT
YOU ARE USING THE NON-NAMESPACED DOCBOOK-XSL STYLESHEETS, SO
THE
NAMESPACE IS BEING STRIPPED FROM YOUR DOCUMENT BEFORE
PROCESSING.

> WARN: NO XML:BASE: CANNOT ADD XML:BASE
TO NODE-SET ROOT ELEMENT  UC:
> IMPORTIEREN VON DATEN üBER WEBINTERFACE
> WARN: NO XML:BASE: RELATIVE PATHS MAY NOT WORK     
              UC:
> IMPORTIEREN VON DATEN üBER WEBINTERFACE
> [...]
> 
> PERHAPS THIS GIVES SOME HINT OF WHAT MIGHT GO WRONG?
> 
> % XSLTPROC --VERSION

ACTUALLY, THOSE MESSAGES DON'T NECESSARILY INDICATE THAT
ANYTHING
IS WRONG. THEY ARE EXPECTED IF YOU'RE USING XSLTPROC. THEY
ARE
THERE TO WARN YOU THAT IN PROCESSING OF NAMESPACED DOCS WITH
THE
DOCBOOK-XSL STYLESHEETS, THERE IS A LIMITATION IN
SINGLE-PASS
NAMESPACE-STRIPPING THAT CAN CAUSE RELATIVE PATHS IN URIS IN
YOUR
DOCUMENT TO BE BROKEN IN OUTPUT.

THE WAY TO AVOID THOSE WARNINGS AND TO AVOID THAT LIMITATION
THEY
ARE WARNING YOU ABOUT IS TO INSTEAD USE THE DOCBOOK-XSL-NS
STYLESHEETS.

  --MIKE

-- 
MICHAEL(TM) SMITH
HTTP://PEOPLE.W3.ORG/MIKE/
HTTP://SIDESHOWBARKER.NET/
Re: pdf image source path no longer working?
user name
2007-08-31 11:07:33
Indeed, those messages are very helpful.  They indicate you
are processing 
a docbook5 document with the non-namespaced stylesheets. 
When processing a 
DocBook5 document with the non-namespaced stylesheets, it
first processes 
the content into a node-set while stripping the namespace
from the document 
elements.  Then it processes the node-set with the
non-namespaced 
templates, which can now match.  In creating the node-set,
however, the 
xml:base of the original document is lost, leading to
problems with 
resolving relative paths.

I would suggest you try processing your DocBook5 documents
with the 
docbook-xsl-ns namespaced stylesheets.  One of the
motivations for creating 
those stylesheets was to avoid the node-set step and the
result problems 
with paths.  Your existing customization layer should still
work because it 
doesn't reference any element names that would require a
namespace prefix.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net


----- Original Message ----- 
From: "Claus" <claus.klingberggmail.com>
To: <docbooklists.oasis-open.org>
Sent: Friday, August 31, 2007 3:05 AM
Subject: Re: [docbook] pdf image source path no longer
working?


One more point I discovered just now (including
debug-output):

I receive the following warnings when compiling using
xsltproc with
v1.73.1 (no warnings with version < 1.72.x):

% xsltproc c:/work/docbook/my_docbook-fo-driver.xsl 
UC-importing-web-style.xml

[...]
Note: namesp. cut : stripped namespace before processing    
      UC:
Importieren von Daten über Webinterface
Warn: no xml:base: cannot add xml:base to node-set root
element  UC:
Importieren von Daten über Webinterface
Warn: no xml:base: relative paths may not work                
   UC:
Importieren von Daten über Webinterface
Note: namesp. cut : processing stripped document            
      UC:
Importieren von Daten über Webinterface
[...]

Perhaps this gives some hint of what might go wrong?

% xsltproc --version
Using libxml 20628, libxslt 10120 and libexslt 813
xsltproc was compiled against libxml 20628, libxslt 10120
and libexslt 813
libxslt 10120 was compiled against libxml 20628
libexslt 813 was compiled against libxml 20628

% head UC-importing-web-style.xml
<?xml version="1.0"
encoding="utf-8"?>
<article xmlns="http://docbook.or
g/ns/docbook"
xmlnsl=&qu
ot;http://www.w3.org/
1999/xlink" version="5.0"
xml:lang="de"
class="specification">
  <title>UC: Importieren von Daten über
Webinterface</title>
 
<subtitle>UC-importing-web-style.html</subtitle>

  <info>
    <date>27.08.2007</date>
[...]

%cat c:/work/docbook/my_docbook-fo-driver.xsl

<xsl:stylesheet xmlnssl=&q
uot;http://www
.w3.org/1999/XSL/Transform"
                version="1.0">
  <xsl:import
href="docbook-xsl-1.73.1/fo/docbook.xsl"/>
  <xsl:param name="draft.watermark.image"
select="''"/>
  <xsl:param name="xep.extensions"
select="1"/>

  <xsl:param name="paper.type"
select="'A4'"/>
  <xsl:param name="preferred.mediaobject.role"
select="fo"/>
  <xsl:param
name="body.font.master">12</xsl:param>

  <xsl:param
name="show.revisionflag">1</xsl:param>
  <xsl:param name="ulink.show"
select="1"></xsl:param>

  <xsl:param
name="page.margin.inner">1in</xsl:param>
  <xsl:param
name="l10n.gentext.default.language" 
select="'de'"></xsl:param>

  <xsl:param
name="img.src.path">../</xsl:param>

</xsl:stylesheet>

Claus



On 8/29/07, Michael(tm) Smith <smithsideshowbarker.net> wrote:
> Claus <claus.klingberggmail.com>, 2007-08-27
16:23 +0200:
>
> > While upgrading the docbook stylesheets from
v1.72.0 to 1.73.1 I
> > noticed that my custom fo-parameter
"img.src.path" stopped working.
> >
> > My xsl-fo parameter-stylesheet has a line like
this:
> >
> > [...]
> >  <xsl:param
name="img.src.path">../</xsl:param>
> > [...]
> >
> > This used to work as expected (find pdf-images one
directory level
> > upwards), but since upgrading to 1.73.1, images in
PDFs are now
> > missing.
>
> I've now run some test cases with both the 1.72.0 and
1.73.1
> stylesheets, using "../" and various other
values for the
> img.src.path param, but I'm not able to reproduce the
problem you
> describe. In every case, I get identical output, with
the images
> appearing as expected.
>
> But it could well be that my test cases are not
modeling what you
> have. So, as I mentioned in my earlier message, if you
could
> send/upload a copy of your DocBook source or some other
file that
> with which you're able to reproduce this problem, along
with a
> copy of you customization layer, I can also check with
that and
> see what I get.
>
> Also note that you can get DocBook help in real time on
the
> #docbook channel on irc.freenode.net
>
>   --Mike
>
> --
> Michael(tm) Smith
> http://people.w3.org/mike/

> http://sideshowbarker.net/

>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org





------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


Re: pdf image source path no longer working?
user name
2007-09-03 08:39:47
Alas, I didn't even know about the ns-stylesheets. Now that
I downloaded
them pointed my customization-layer to it, everything works
like it used
to. All images showing up again, problem resolved.

Thanks Michael + Bob!

Claus


On 8/31/07, Bob Stayton <bobssagehill.net> wrote:
> Indeed, those messages are very helpful.  They indicate
you are processing
> a docbook5 document with the non-namespaced
stylesheets.  When processing a
> DocBook5 document with the non-namespaced stylesheets,
it first processes
> the content into a node-set while stripping the
namespace from the document
> elements.  Then it processes the node-set with the
non-namespaced
> templates, which can now match.  In creating the
node-set, however, the
> xml:base of the original document is lost, leading to
problems with
> resolving relative paths.
>
> I would suggest you try processing your DocBook5
documents with the
> docbook-xsl-ns namespaced stylesheets.  One of the
motivations for creating
> those stylesheets was to avoid the node-set step and
the result problems
> with paths.  Your existing customization layer should
still work because it
> doesn't reference any element names that would require
a namespace prefix.
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobssagehill.net
>
>
> ----- Original Message -----
> From: "Claus" <claus.klingberggmail.com>
> To: <docbooklists.oasis-open.org>
> Sent: Friday, August 31, 2007 3:05 AM
> Subject: Re: [docbook] pdf image source path no longer
working?
>
>
> One more point I discovered just now (including
debug-output):
>
> I receive the following warnings when compiling using
xsltproc with
> v1.73.1 (no warnings with version < 1.72.x):
>
> % xsltproc c:/work/docbook/my_docbook-fo-driver.xsl
> UC-importing-web-style.xml
>
> [...]
> Note: namesp. cut : stripped namespace before
processing           UC:
> Importieren von Daten über Webinterface
> Warn: no xml:base: cannot add xml:base
to node-set root element  UC:
> Importieren von Daten über Webinterface
> Warn: no xml:base: relative paths may not work     
              UC:
> Importieren von Daten über Webinterface
> Note: namesp. cut : processing stripped document       
           UC:
> Importieren von Daten über Webinterface
> [...]
>
> Perhaps this gives some hint of what might go wrong?
>
> % xsltproc --version
> Using libxml 20628, libxslt 10120 and libexslt 813
> xsltproc was compiled against libxml 20628, libxslt
10120 and libexslt 813
> libxslt 10120 was compiled against libxml 20628
> libexslt 813 was compiled against libxml 20628
>
> % head UC-importing-web-style.xml
> <?xml version="1.0"
encoding="utf-8"?>
> <article xmlns="http://docbook.or
g/ns/docbook"
> xmlnsl=&qu
ot;http://www.w3.org/
1999/xlink" version="5.0"
xml:lang="de"
> class="specification">
>   <title>UC: Importieren von Daten über
Webinterface</title>
>  
<subtitle>UC-importing-web-style.html</subtitle>

>   <info>
>     <date>27.08.2007</date>
> [...]
>
> %cat c:/work/docbook/my_docbook-fo-driver.xsl
>
> <xsl:stylesheet xmlnssl=&q
uot;http://www
.w3.org/1999/XSL/Transform"
>                 version="1.0">
>   <xsl:import
href="docbook-xsl-1.73.1/fo/docbook.xsl"/>
>   <xsl:param name="draft.watermark.image"
select="''"/>
>   <xsl:param name="xep.extensions"
select="1"/>
>
>   <xsl:param name="paper.type"
select="'A4'"/>
>   <xsl:param
name="preferred.mediaobject.role"
select="fo"/>
>   <xsl:param
name="body.font.master">12</xsl:param>
>
>   <xsl:param
name="show.revisionflag">1</xsl:param>
>   <xsl:param name="ulink.show"
select="1"></xsl:param>
>
>   <xsl:param
name="page.margin.inner">1in</xsl:param>
>   <xsl:param
name="l10n.gentext.default.language"
> select="'de'"></xsl:param>
>
>   <xsl:param
name="img.src.path">../</xsl:param>
>
> </xsl:stylesheet>
>
> Claus
>
>
>
> On 8/29/07, Michael(tm) Smith <smithsideshowbarker.net> wrote:
> > Claus <claus.klingberggmail.com>, 2007-08-27
16:23 +0200:
> >
> > > While upgrading the docbook stylesheets from
v1.72.0 to 1.73.1 I
> > > noticed that my custom fo-parameter
"img.src.path" stopped working.
> > >
> > > My xsl-fo parameter-stylesheet has a line
like this:
> > >
> > > [...]
> > >  <xsl:param
name="img.src.path">../</xsl:param>
> > > [...]
> > >
> > > This used to work as expected (find
pdf-images one directory level
> > > upwards), but since upgrading to 1.73.1,
images in PDFs are now
> > > missing.
> >
> > I've now run some test cases with both the 1.72.0
and 1.73.1
> > stylesheets, using "../" and various
other values for the
> > img.src.path param, but I'm not able to reproduce
the problem you
> > describe. In every case, I get identical output,
with the images
> > appearing as expected.
> >
> > But it could well be that my test cases are not
modeling what you
> > have. So, as I mentioned in my earlier message, if
you could
> > send/upload a copy of your DocBook source or some
other file that
> > with which you're able to reproduce this problem,
along with a
> > copy of you customization layer, I can also check
with that and
> > see what I get.
> >
> > Also note that you can get DocBook help in real
time on the
> > #docbook channel on irc.freenode.net
> >
> >   --Mike
> >
> > --

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-helplists.oasis-open.org


[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )