DocBook Attributes Pane Bug?

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
odeon
Posts: 44
Joined: Mon Mar 12, 2007 1:56 am
Location: Sweden

DocBook Attributes Pane Bug?

Post by odeon » Tue Oct 22, 2019 9:43 am

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

Radu
Posts: 6907
Joined: Fri Jul 09, 2004 5:18 pm

Re: DocBook Attributes Pane Bug?

Post by Radu » Tue Oct 22, 2019 9:55 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

odeon
Posts: 44
Joined: Mon Mar 12, 2007 1:56 am
Location: Sweden

Re: DocBook Attributes Pane Bug?

Post by odeon » Tue Oct 22, 2019 9:58 am

Oh, and please disregard the bug that is currently generating a <secondary> element when it should be generating <primary>. :)

odeon
Posts: 44
Joined: Mon Mar 12, 2007 1:56 am
Location: Sweden

Re: DocBook Attributes Pane Bug?

Post by odeon » Tue Oct 22, 2019 7:28 pm

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.

Radu
Posts: 6907
Joined: Fri Jul 09, 2004 5:18 pm

Re: DocBook Attributes Pane Bug?

Post by Radu » Wed Oct 23, 2019 2:48 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

odeon
Posts: 44
Joined: Mon Mar 12, 2007 1:56 am
Location: Sweden

Re: DocBook Attributes Pane Bug?

Post by odeon » Wed Oct 23, 2019 2:51 pm

Hi Radu,

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

All the best,

/Ari

Radu
Posts: 6907
Joined: Fri Jul 09, 2004 5:18 pm

Re: DocBook Attributes Pane Bug?

Post by Radu » Tue Feb 18, 2020 4:44 pm

Hi Ari,

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply