Bug 246755 - Meinproc4 --param options not allowing . in directory path
Summary: Meinproc4 --param options not allowing . in directory path
Status: RESOLVED FIXED
Alias: None
Product: docs.kde.org
Classification: Websites
Component: ksgmltools (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Documentation Editorial Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-05 02:44 UTC by David Hubner
Modified: 2014-03-09 00:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Hubner 2010-08-05 02:44:26 UTC
Version:           CVS (using KDE 4.5.0) 
OS:                Linux

It seems meinproc4 will not allow a hidden directory in an --output directory which is a problem here http://lists.kde.org/?l=kde-doc-english&m=125624299320708&w=2 ( Under problem 2 ) 

This is because the xsltApplyStylesheet parameters is passed the output file location 

params.append( qstrdup( "outputFile" ) );
params.append( qstrdup( args->getOption( "output" ).toLocal8Bit() ) );

Not sure why but by the looks its to do with share/apps/ksgmltools2/docbook/xsl/html/math.xsl


Reproducible: Always

Steps to Reproduce:
Do something like meinproc4 --stylesheet=/usr/share/apps/khelpcenter/glossary.xslt -o /home/hubnerd/.kde4/foo.html /home/hubnerd/Code/Documentation/infosummary/index.docbook --check 


Actual Results:  
XPath error : Invalid expression
/home/hubnerd/.kde4/foo.html
               ^
runtime error
Evaluating user parameter utputFile failed ( <-- Where did the O go? )  


Expected Results:  
Nothing displayed, docbook html made.
Comment 1 Burkhard Lück 2011-07-19 19:30:44 UTC
@ David Hubner:
I remember you wrote in a mail you probably know how to fix that?

Please add this info here.

Thanks
Comment 2 Luigi Toscano 2014-03-08 23:55:52 UTC
Git commit 4406199290ab5192c178929fbc56a272e2fa8d7b by Luigi Toscano.
Committed on 08/03/2014 at 23:55.
Pushed by ltoscano into branch 'master'.

The outputFile parameter is not used by the stylesheets, don't pass it

This solve an old issue: if a directory starts with ".", it was passed
unquoted to libxslt which would complain with an error like:
-------------------
XPath error : Invalid expression
/home/kde-devel/.cache5/khelpcenter/help/__home__kde-
devel__kde__share__doc__HTML__en__kioslave__file__index.docbook
                     ^
runtime error
Evaluating user parameter outputFile failed
-------------------
Excluding the parameter on windows-only was just a workaround, but most
probably the issue has been on UNIX systems too for a long time.

Another way to solve the bug is quoting the _value_ of the parameter using
single quotes '...', but anyway in this case the name of output file is
not used, or I can't find any occurrence in the stylesheets.
The stylesheet is applied and the name of the file is used only after
to write the generated XML (see tranform() function).
REVIEW: 116604

M  +0    -10   src/meinproc.cpp

http://commits.kde.org/kdoctools/4406199290ab5192c178929fbc56a272e2fa8d7b
Comment 3 Luigi Toscano 2014-03-08 23:56:38 UTC
Git commit 05f7e41b476ec1a5e6fb2f2efc0411885a4d7ee1 by Luigi Toscano.
Committed on 08/03/2014 at 23:55.
Pushed by ltoscano into branch 'master'.

The outputFile parameter is not used by the stylesheets, don't pass it

This solve an old issue: if a directory starts with ".", it was passed
unquoted to libxslt which would complain with an error like:
-------------------
XPath error : Invalid expression
/home/kde-devel/.cache5/khelpcenter/help/__home__kde-
devel__kde__share__doc__HTML__en__kioslave__file__index.docbook
                     ^
runtime error
Evaluating user parameter outputFile failed
-------------------
Excluding the parameter on windows-only was just a workaround, but most
probably the issue has been on UNIX systems too for a long time.

Another way to solve the bug is quoting the _value_ of the parameter using
single quotes '...', but anyway in this case the name of output file is
not used, or I can't find any occurrence in the stylesheets.
The stylesheet is applied and the name of the file is used only after
to write the generated XML (see tranform() function).

Backport from the similar fix applied on frameworks.

M  +0    -10   kdoctools/meinproc.cpp

http://commits.kde.org/kdelibs/05f7e41b476ec1a5e6fb2f2efc0411885a4d7ee1