Bug 94154 - Bold tags being placed around other tags
Summary: Bold tags being placed around other tags
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HelpAuthoring-Extension
  Show dependency treegraph
 
Reported: 2015-09-12 07:48 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-07-28 11:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
forked version 0.5 (115.11 KB, application/zip)
2015-09-12 19:11 UTC, Yousuf Philips (jay) (retired)
Details
screencast (9.44 MB, video/webm)
2015-09-12 22:28 UTC, Yousuf Philips (jay) (retired)
Details
Shortened version of /source/text/shared/01/01020000.xhp (2.46 KB, application/xml)
2015-09-15 20:50 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-09-12 07:48:20 UTC
While checking the saved output from the authoring tool, i noticed that bold <emph> tags are being place around other tags.

Original XML

<emph><switchinline select="sys"><caseinline select="MAC">%PRODUCTNAME - Preferences</caseinline><defaultinline>Tools - Options</defaultinline></switchinline> - <link href="text/shared/optionen/01010600.xhp" name="%PRODUCTNAME - General">%PRODUCTNAME- General</link></emph>

Output XML

<emph><switchinline select="sys"></emph><emph><caseinline select="MAC"></emph><emph>%PRODUCTNAME - Preferences</emph><emph>
</caseinline></emph><emph><defaultinline></emph><emph>Tools - Options</emph><emph></defaultinline></emph><emph></switchinline></emph><emph> - </emph><emph><link href="text/shared/optionen/01010600.xhp" name="%PRODUCTNAME - General"></emph><emph>%PRODUCTNAME- General</emph><emph></link></emph>

The simplest thing is to just removal all '</emph><emph>' entries from the output, which would solve the issue.
Comment 1 Regina Henschel 2015-09-12 14:41:08 UTC
Which version do you use?

That should already be solved. Look into the file soffice2xmlhelp.xsl in folder "filter" in the *.oxt container. If it has a line
<xsl:when test="not(starts-with($masterstyle,'hlp_'))"><emph><xsl:apply-templates/></emph></xsl:when>
instead of 
<xsl:when test="not(starts-with($masterstyle,'hlp_'))"><xsl:apply-templates/></xsl:when>

then it is an old version.
Comment 2 Yousuf Philips (jay) (retired) 2015-09-12 16:04:12 UTC
I'm running my modified fork of 3.1.0 and it has

<xsl:when test="not(starts-with($masterstyle,'hlp_'))"><xsl:apply-templates/></xsl:when>
Comment 3 Regina Henschel 2015-09-12 18:37:53 UTC
Can you please attach this special helpauthoring.oxt here. I know you have mentioned it on the mailing-list, but I do not find it.

And please say on which file you have tested it.

Do you see the same problem with the version 3.1.1
Comment 4 Yousuf Philips (jay) (retired) 2015-09-12 19:11:15 UTC
Created attachment 118648 [details]
forked version 0.5

The file tested - /source/text/shared/01/01020000.xhp

It shows up in 3.1.1 release, so it will be there also in the 3.1.0 release you are using.
Comment 5 Regina Henschel 2015-09-12 20:50:56 UTC
I do not get the same as you. I get

Original XML
<emph><switchinline select="sys"><caseinline select="MAC">%PRODUCTNAME - Preferences</caseinline><defaultinline>Tools - Options</defaultinline></switchinline> - <link href="text/shared/optionen/01010300.xhp" name="%PRODUCTNAME - Paths">%PRODUCTNAME - Paths</link></emph>

Resaved XML
<switchinline select="sys"><caseinline select="MAC"><emph>%PRODUCTNAME - Preferences</emph>
</caseinline><defaultinline><emph>Tools - Options</emph></defaultinline></switchinline><emph> - </emph><link href="text/shared/optionen/01010300.xhp" name="%PRODUCTNAME - Paths"><emph>%PRODUCTNAME - Paths</emph></link>

Notice, that in the original XML the emph-element is the outer one and has the children 'switchinline' and 'link'. But both are not allowed as child of an emph-element in xmlhelp.dtd. Therefore the extension correctly moves the emph-element to the content of 'switchinline' and 'link'. There the emph-element is an allowed child and the file becomes valid against the xmlhelp.dtd.

Does your output really has a <emph>-tag before the <switchinline> tag and an </emph> element after the </link> element?
Comment 6 Yousuf Philips (jay) (retired) 2015-09-12 22:28:59 UTC
Created attachment 118658 [details]
screencast

(In reply to Regina Henschel from comment #5)
> Does your output really has a <emph>-tag before the <switchinline> tag and
> an </emph> element after the </link> element?

Yes. Check the screencast using oxt 3.1.1 and LO 5.0 daily. :D
Comment 7 Regina Henschel 2015-09-13 00:07:19 UTC
I have used Version: 5.1.0.0.alpha1+
Build ID: fdafa5302df26df4f147b0d2efb6064389a1330c
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-08-22_23:42:26
Locale: de-DE (de_DE)
Comment 8 Yousuf Philips (jay) (retired) 2015-09-13 02:50:54 UTC
I use master with my 3.1.0 fork.

Version: 5.1.0.0.alpha1+
Build ID: eb2e1ab4651350bffc53f618961a910bd3bbcfd9
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-09-02_23:57:52
Locale: en-US (en_US.UTF-8)
Comment 9 Regina Henschel 2015-09-13 12:26:00 UTC
Now I have download Version: 5.1.0.0.alpha1+
Build ID: 88c51cd55d1a9b29e62269c53b3923770253ab07
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-09-11_13:09:15
Locale: de-DE (de_DE)

And now I see the error too.

Because I have used version 3.1.1 in both cases, I fear, that a change in the core interferes with the extension.
Comment 10 Regina Henschel 2015-09-15 20:50:48 UTC
Created attachment 118755 [details]
Shortened version of /source/text/shared/01/01020000.xhp

Another way to reproduce:
Install the extension helpauthoring.oxt. You get the two filters xmlhelp2soffice.xsl and soffice2xmlhelp.xsl. They are registers, so that you can use them from Tools > XML Filter settings.

Select item 'XHP_Help' and then click on button 'Test XSLTs..'

I have done this with LO4.2 and LO5.1
The results from the import filter xmlhelp2soffice.xsl is identical.

But the export filter soffice2xmlhelp.xsl works in LO4.2 but not in LO5.1. Because here are really only the filters involved and not any Basic code of the extension, I think, the problem is not in the extension but in core.

The xml result of the export filter in LO5.2 is not even well-formed, although it uses the same input as in LO4.2.
Comment 11 QA Administrators 2016-09-20 10:32:47 UTC Comment hidden (obsolete)
Comment 12 Olivier Hallot 2018-07-28 11:37:22 UTC
Helpauthoring extension is deprecated. closing wontfix.