You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Niklas Saers Mailinglistaccount <ni...@saers.com> on 2002/09/11 14:34:44 UTC

link

Hi, when running fop 0.20.4 I get

[ERROR] internal-destination or external-destination must be specified in
basic-link

This is all good, but my document is large and I need to know what link it
is talking about. How would I go about figuring out what link it refers
to? I've been grepping around for half an hour without finding it.

Also, I get

[ERROR] property - "background-attachment" is not implemented yet.
[ERROR] property - "background-position-horizontal" is not implemented yet.
[ERROR] property - "background-position-vertical" is not implemented yet.

when running it. I have not set these, but I guess my stylesheet
(fo/docbook) has. Is this something to worry about?

And what's up with all the empty [INFO] messages?
i.e:
  [INFO] [1]
  [INFO] [2]
  [INFO] [3]
  [INFO] [4]

Sorry if these are really newbie-questions, but to fop I am a newbie

Cheers

  Nik


Re: link

Posted by "Peter B. West" <pb...@powerup.com.au>.
J.Pietschmann wrote:
> An XPath engine or a very simple style sheet can do the trick.
> I have a shell script for exactly this purpose:
> cat > $$.tmp << EOF
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

...

> EOF

Joerg,

Thanks for this.  I would never have expected the double apostrophes to 
survive, and I've been writing shell for a loooong time, although I 
rarely use here documents.

Peter
-- 
Peter B. West  pbwest@powerup.com.au  http://www.powerup.com.au/~pbwest/
"Lord, to whom shall we go?"


Re: link

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Keiron Liddle wrote:
>>[ERROR] internal-destination or external-destination must be specified in
>>basic-link
> 
> It would be good if it could somehow tell you where it is but the basic
> link doesn't have any context information.
> I think the only solution is to search in the fo file. Maybe you need
> the right regexp ;-)

An XPath engine or a very simple style sheet can do the trick.
I have a shell script for exactly this purpose:
cat > $$.tmp << EOF
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:saxon="http://icl.com/saxon"
  xmlns:fo="http://www.w3.org/1999/XSL/Format"
  xmlns:svg="http://www.w3.org/2000/svg">
  <xsl:output method="text"/>
  <xsl:template match="/">
    <xsl:for-each select="$1">
      <xsl:value-of select="saxon:systemId()"/>
      <xsl:text>:</xsl:text>
      <xsl:value-of select="saxon:line-number()"/>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>
EOF
saxon -l $2 $$.tmp
rm $$.tmp

A java wrapper would do even better (no quoting of the XPath expr.,
get namespaces from the XML doc etc.)
Getting the problematic basic-links is then easy:
   query.sh "fo:basic-link[not(internal-destination|external-destination)]" fofile.fo


J.Pietschmann


Re: link

Posted by Harm Kok <h....@diderottrack.nl>.
Hi,

basic-link is "fo:basic-link" so you should not look in your XML file, 
but in the FO file that is created. "fo:basic-link" has got an attribute 
called "external-destination" or an attributed called 
"internal-destination" which is mandantory. Probably they are empty or 
not there in your FO file.

Hope this helps,

Harm Kok

Diderot Track

----------------------------------------------------------

Keiron Liddle wrote:

>On Wed, 2002-09-11 at 15:31, Niklas Saers Mailinglistaccount wrote:
>  
>
>>On 11 Sep 2002, Keiron Liddle wrote:
>>
>>    
>>
>>>>[ERROR] internal-destination or external-destination must be specified in
>>>>basic-link
>>>>        
>>>>
>>>It would be good if it could somehow tell you where it is but the basic
>>>link doesn't have any context information.
>>>      
>>>
>>In an XML document, it should definitively have context information. But,
>>for that matter, what is a basic link? Is it an xref, link, ulink? Is it
>>an attribute like linkend, xreflabel, id??
>>    
>>
>
>The XML document has context information but by the time that handler
>for basic-link gets it the information is lost. It is probably possible
>to get the information but no one has done it yet.
>
>A basic-link is "a simple one-directional single-target link". It links
>to an fo created area using an id or to a URL. I don't know what all
>those other terms mean.
>
>Is it being created by docbook? Maybe there is some missing attribute.
>
>  
>
>>>They aren't actually empty the "[1]" means that the page (1) is being
>>>done.
>>>      
>>>
>>Ok, but this wouldn't this only be usefull if there were errors or
>>warnings on the page?
>>    
>>
>
>Some people like to know how many pages are rendered.
>
>  
>
>>Cheers
>>
>>  Nik
>>
>>
>>    
>>
>
>  
>




Re: link

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Niklas Saers Mailinglistaccount wrote:
> While this is a user-list, if some developers feel that they have too
> little to do (which I guess is wishfull thinking ;) ) that would probably
> be a very nice feature in order to do debugging of XML documents.

While it is at least somewhat possible to get some context
from the intermediate FO file, it is next to impossible to
get the position in the source XML (DocBook).
Well, getting to the position in the FO file would already
be an advancement, because some context form there, like
surrounding text or image source hrefs) probably allows you
get to the problematic content in the XML source.

J.Pietschmann


Re: link

Posted by Niklas Saers Mailinglistaccount <ni...@saers.com>.
Hei Keiron, thanks for taking the time to answer. :)

On 11 Sep 2002, Keiron Liddle wrote:

> The XML document has context information but by the time that handler
> for basic-link gets it the information is lost. It is probably possible
> to get the information but no one has done it yet.

While this is a user-list, if some developers feel that they have too
little to do (which I guess is wishfull thinking ;) ) that would probably
be a very nice feature in order to do debugging of XML documents.

> A basic-link is "a simple one-directional single-target link". It links
> to an fo created area using an id or to a URL. I don't know what all
> those other terms mean.

Right, so can this indicate that the bug is actually in either the xsl
processor (I've used both xsltproc and com.jclark.xsl.sax.Driver) or the
XSL FO-scheme (I'm using DocBook's fo/docbook.xsl version 1.18 from March
14th) rather than the actual XML document I'm writing? The XHTML-version
is being generated just fine.

> Is it being created by docbook? Maybe there is some missing attribute.

The FO is being created from a DocBook document, yes. What kind of
attributes would normally be missing for such a condition to arise?

Cheers

   Nik


Re: link

Posted by Keiron Liddle <ke...@aftexsw.com>.
On Wed, 2002-09-11 at 15:31, Niklas Saers Mailinglistaccount wrote:
> On 11 Sep 2002, Keiron Liddle wrote:
> 
> > > [ERROR] internal-destination or external-destination must be specified in
> > > basic-link
> > It would be good if it could somehow tell you where it is but the basic
> > link doesn't have any context information.
> 
> In an XML document, it should definitively have context information. But,
> for that matter, what is a basic link? Is it an xref, link, ulink? Is it
> an attribute like linkend, xreflabel, id??

The XML document has context information but by the time that handler
for basic-link gets it the information is lost. It is probably possible
to get the information but no one has done it yet.

A basic-link is "a simple one-directional single-target link". It links
to an fo created area using an id or to a URL. I don't know what all
those other terms mean.

Is it being created by docbook? Maybe there is some missing attribute.

> > They aren't actually empty the "[1]" means that the page (1) is being
> > done.
> 
> Ok, but this wouldn't this only be usefull if there were errors or
> warnings on the page?

Some people like to know how many pages are rendered.

> Cheers
> 
>   Nik
> 
> 



Re: link

Posted by Niklas Saers Mailinglistaccount <ni...@saers.com>.
On 11 Sep 2002, Keiron Liddle wrote:

> > [ERROR] internal-destination or external-destination must be specified in
> > basic-link
> It would be good if it could somehow tell you where it is but the basic
> link doesn't have any context information.

In an XML document, it should definitively have context information. But,
for that matter, what is a basic link? Is it an xref, link, ulink? Is it
an attribute like linkend, xreflabel, id??

> They aren't actually empty the "[1]" means that the page (1) is being
> done.

Ok, but this wouldn't this only be usefull if there were errors or
warnings on the page?

Cheers

  Nik


Re: link

Posted by Keiron Liddle <ke...@aftexsw.com>.
On Wed, 2002-09-11 at 14:34, Niklas Saers Mailinglistaccount wrote:
> Hi, when running fop 0.20.4 I get
> 
> [ERROR] internal-destination or external-destination must be specified in
> basic-link

It would be good if it could somehow tell you where it is but the basic
link doesn't have any context information.
I think the only solution is to search in the fo file. Maybe you need
the right regexp ;-)

> This is all good, but my document is large and I need to know what link it
> is talking about. How would I go about figuring out what link it refers
> to? I've been grepping around for half an hour without finding it.
> 
> Also, I get
> 
> [ERROR] property - "background-attachment" is not implemented yet.
> [ERROR] property - "background-position-horizontal" is not implemented yet.
> [ERROR] property - "background-position-vertical" is not implemented yet.
> 
> when running it. I have not set these, but I guess my stylesheet
> (fo/docbook) has. Is this something to worry about?

Nothing to worry about, it can be safely ignored. Just a notice that
your fo contains things that aren't implemented.

> And what's up with all the empty [INFO] messages?
> i.e:
>   [INFO] [1]
>   [INFO] [2]
>   [INFO] [3]
>   [INFO] [4]

They aren't actually empty the "[1]" means that the page (1) is being
done.

> Sorry if these are really newbie-questions, but to fop I am a newbie
> 
> Cheers
> 
>   Nik
> 
>