Re: [docbook-apps] DocBook xslTNG prerelease 2.0.7

2023-02-06 Thread Jirka Kosek

On 06.02.2023 20:07, Tony Graham wrote:

If you look at line 145, $default-language is used if there's no
$gentext-language and no @xml:lang.  An empty @xml:lang would be used
ahead of $default-language and would result in those empty values in the
error message.


Empty @xml:lang can be result of XInclude when included files do not 
explicitly specify @xml:lang.


--
--
  Jirka Kosek  e-mail: ji...@kosek.cz  http://xmlguru.cz
--
 Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
--
Bringing you XML Prague conferencehttp://xmlprague.cz
--


OpenPGP_signature
Description: OpenPGP digital signature


Re: [docbook-apps] DocBook xslTNG prerelease 2.0.7

2023-02-06 Thread Tony Graham

On 06/02/2023 18:58, Dave Pawson wrote:

On Mon, 6 Feb 2023 at 18:48, Tony Graham  wrote:


On 06/02/2023 15:23, Thomas Schraitle wrote:
...

No localization exists for "" or "". Using default "en".
Error at xsl:text on line 169 column 19 of functions.xsl:
XTMM9000  Processing terminated by xsl:message at line 169 in
functions.xsl


Do you have any 'xml:lang=""' in your document(s)?

It looks like the function [1] can really only generate 'No localization
exists for "" or "".' if '$gentext-language' is not set (not that I know
how to set it) and there's an 'xml:lang=""' somewhere in your document.

...

Which begs the question, where to set the default language, and should
it be reported as a bug if not set?
[Guess, $gentext-language will default to 'default language' - does
that make sense?]


If you look at line 145, $default-language is used if there's no
$gentext-language and no @xml:lang.  An empty @xml:lang would be used
ahead of $default-language and would result in those empty values in the
error message.

Regards,


Tony Graham.
--
Senior Architect
XML Division
Antenna House, Inc.

Skerries, Ireland
tgra...@antenna.co.jp


[1] 
https://github.com/docbook/xslTNG/blob/main/src/main/xslt/modules/functions.xsl#L139


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] DocBook xslTNG prerelease 2.0.7

2023-02-06 Thread Dave Pawson
On Mon, 6 Feb 2023 at 18:48, Tony Graham  wrote:
>
> On 06/02/2023 15:23, Thomas Schraitle wrote:
> ...
> > No localization exists for "" or "". Using default "en".
> > Error at xsl:text on line 169 column 19 of functions.xsl:
> >XTMM9000  Processing terminated by xsl:message at line 169 in
> > functions.xsl
>
> Do you have any 'xml:lang=""' in your document(s)?
>
> It looks like the function [1] can really only generate 'No localization
> exists for "" or "".' if '$gentext-language' is not set (not that I know
> how to set it) and there's an 'xml:lang=""' somewhere in your document.
>
> The 'terminate="yes"' on line 168 does rather contradict the message
> that processing will continue with the default language.

Which begs the question, where to set the default language, and should
it be reported as a bug if not set?
[Guess, $gentext-language will default to 'default language' - does
that make sense?]

HTH
-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] DocBook xslTNG prerelease 2.0.7

2023-02-06 Thread Tony Graham

On 06/02/2023 15:23, Thomas Schraitle wrote:
...

No localization exists for "" or "". Using default "en".
Error at xsl:text on line 169 column 19 of functions.xsl:
   XTMM9000  Processing terminated by xsl:message at line 169 in 
functions.xsl


Do you have any 'xml:lang=""' in your document(s)?

It looks like the function [1] can really only generate 'No localization
exists for "" or "".' if '$gentext-language' is not set (not that I know
how to set it) and there's an 'xml:lang=""' somewhere in your document.

The 'terminate="yes"' on line 168 does rather contradict the message
that processing will continue with the default language.

Regards,


Tony Graham.
--
Senior Architect
XML Division
Antenna House, Inc.

Skerries, Ireland
tgra...@antenna.co.jp


[1] 
https://github.com/docbook/xslTNG/blob/main/src/main/xslt/modules/functions.xsl#L139


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] DocBook xslTNG prerelease 2.0.7

2023-02-06 Thread Thomas Schraitle

Hi

On 03.02.23 15:43, Norm Tovey-Walsh wrote:


A few weeks ago, I posted a note about the DocBook xslTNG Stylesheets
then current 2.0.2 prerelease. This morning I posted 2.0.7. The big
change is in handling of media:

   https://xsltng.docbook.org/guide/2.0.7/ch-customizing.html#media

Feedback eagerly solicited.


Thanks for all your efforts and time! \o/ Much appreciated!

This time I've tried it with the sources from https://github.com/SUSE/doc-sle.
Before I called it, I had to prepare a directory of all image files under
build/.tmp/img. That directory contains all the links to images/src/ (we have
separate directories for PNG and SVG).

The main file is xml/MAIN.SLEDS.xml and contains all XIncludes for different
chapters. I run the docbook script with the following arguments:

-
$ /tmp/docbook-xslTNG-2.0.7/bin/docbook -xi \
   -s:xml/MAIN.SLEDS.xml -o:build/.tmp/SLES-installation.html \
   -xsl:/usr/share/xml/docbook/stylesheet/xsltng/xslt/docbook.xsl \
   media-input-base-uri=build/.tmp/img \
   mediaobject-output-base-uri=media/
No localization exists for "" or "". Using default "en".
Error at xsl:text on line 169 column 19 of functions.xsl:
  XTMM9000  Processing terminated by xsl:message at line 169 in functions.xsl
at function f:l10n-language on line 139 column 65 of functions.xsl:
 invoked by function call at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/modules/gentext.xsl#95
at function fp:localization-template on line 91 column 60 of gentext.xsl:
 invoked by unknown caller (class net.sf.saxon.value.MemoClosure)
at function fp:localization-template on line 91 column 60 of gentext.xsl:
 invoked by function call at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/modules/gentext.xsl#433
  In template rule with match="*" on line 428 of gentext.xsl
 invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#372
  In template rule with match="*" on line 370 of 50-normalize.xsl
 invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#351
at template tp:normalize-generated-title on line 320 column 51 of 
50-normalize.xsl:
 invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#256
  In template rule with
match="element(Q{http://docbook.org/ns/docbook}abstract)" on line 255 of
50-normalize.xsl
 invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#435
at template tp:normalize-dbinfo on line 424 column 42 of 50-normalize.xsl:
 invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#383
  In template rule with match="element(Q{http://docbook.org/ns/docbook}info)"
on line 377 of 50-normalize.xsl
 invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#102
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xsl:
 invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#491
  In template rule with match="*" on line 477 of 50-normalize.xsl
 invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#111
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xsl:
 invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#491
  In template rule with match="*" on line 477 of 50-normalize.xsl
 invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#102
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xsl:
 invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#491
  In template rule with match="*" on line 477 of 50-normalize.xsl
 invoked by xsl:apply-templates at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#102
at template tp:normalize-movetitle on line 96 column 45 of 50-normalize.xsl:
 invoked by xsl:call-template at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#491
  In template rule with match="*" on line 477 of 50-normalize.xsl
 invoked by xsl:next-match at
file:/usr/share/xml/docbook/stylesheet/xsltng/xslt/transforms/50-normalize.xsl#27
  In template rule with match="/*" on line 25 of 50-normalize.xsl
 invoked by built-in template rule (text-only)
Processing terminated by xsl:message at line 169 in functions.xsl
-

I don't know where this 'No localization exists for ""' comes from. Had it in
previous versions, too. ;) Of course, the result HTML is zero bytes. :)

To help debugging, would it make sense to have an option that the HTML could be
still generated?