Page 1 of 1

DocBook Attributes Pane Bug?

Posted: Tue Oct 22, 2019 9:43 am
by odeon
Hi,

I've been converting HTML to DocBook and sometimes, when the editor opens the result of an XSLT transformation, I can see an attribute duplicated in the Attributes list to the right. For example, given this XML fragment, a result of converting HTML index pseudo markup to DocBook index markup:

Code: Select all

<indexterm xmlns="http://docbook.org/ns/docbook" type="caselaw"><secondary>Göta hovrätts dom den 5 april 2013 i mål nr B 41-13</secondary></indexterm>
The Attributes Pane displays this:

https://previews.dropbox.com/p/thumb/AA ... ize_mode=5

The type attribute was just created from this XSLT:

Code: Select all

<xsl:template match="xh:span[@class='index']" mode="HTML2DB_INDEX">
        <xsl:element name="indexterm" namespace="http://docbook.org/ns/docbook">
            <xsl:choose>
                <xsl:when test="xh:index-type = 'Rättsfall'">
                    <xsl:attribute name="type" select="'caselaw'"/>
                </xsl:when>
            </xsl:choose>
            
            <xsl:apply-templates select="node()" mode="HTML2DB_INDEX"/>
        </xsl:element>
    </xsl:template>
You should know that the result XML is not valid DocBook - it's the output of an intermediate step and contains a mix of HTML, DocBook, and various processing markup belonging to other namespaces.

My oXygen version is 21.1, build 2019090904, and I'm on Ubuntu 19.04, if that helps. Please let me know if you need anything else from me.

Thanks,

/Ari

Re: DocBook Attributes Pane Bug?

Posted: Tue Oct 22, 2019 9:55 am
by Radu
Hi Ari,

I do not have access to your preview image as it seems there are not public access rights set on the image in Dropbox. I remember I fixed a similar issue about two months ago so this problem of duplicate attributes showing up in the Attributes view might be fixed in Oxygen 22 (January 2020).
But I cannot be sure because I cannot reproduce the problem on my side in a plain DocBook 5 document (without the mixed namespaces you have on your side).

Regards,
Radu

Re: DocBook Attributes Pane Bug?

Posted: Tue Oct 22, 2019 9:58 am
by odeon
Oh, and please disregard the bug that is currently generating a <secondary> element when it should be generating <primary>. :)

Re: DocBook Attributes Pane Bug?

Posted: Tue Oct 22, 2019 7:28 pm
by odeon
Hi Radu,

Thanks for replying so quickly.

I've sent the necessary XML and XSLT to you through the support form, as the content is proprietary and belongs to my employer.

Best,

/Ari.

Re: DocBook Attributes Pane Bug?

Posted: Wed Oct 23, 2019 2:48 pm
by Radu
Hi Ari,

Thanks for the samples, I can confirm the problem was present in Oxygen 21.1 (Oxygen detected from the schema a @type attribute in no namespace and a @type attribute in the xlink namespace and it got confused about which one was set).
And I can confirm that Oxygen 22 (January 2020) will no longer have the problem.

Regards,
Radu

Re: DocBook Attributes Pane Bug?

Posted: Wed Oct 23, 2019 2:51 pm
by odeon
Hi Radu,

Thanks for investigating, and for the fix, of course.

All the best,

/Ari

Re: DocBook Attributes Pane Bug?

Posted: Tue Feb 18, 2020 4:44 pm
by Radu
Hi Ari,

We released Oxygen 22 which should have this problem we discussed fixed.

Regards,
Radu