Attributes View doesn't show empty attributes

Oxygen general issues.
JurgenVandenberghe
Posts: 2
Joined: Tue Aug 07, 2012 4:42 pm

Attributes View doesn't show empty attributes

Post by JurgenVandenberghe »

Maybe a very stupid question, but i've looked all over the forum and the manual and ...

I don't know what i did or how i did it, but since this morning, the "Attributes View" in Oxygen Author only shows attributes with a value. Empty attributes are no longer shown.

Any idea what i did (wrong) and how i can fix this ?

Thanks !
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Attributes View doesn't show empty attributes

Post by adrian »

Hello,

What type of XML document are you editing (DocBook, DITA, something custom/internal)?

Are you sure this is about attributes with an empty value, or is it about attributes that are simply not present in the XML (they are declared/implied in a DTD or schema)?

e.g. attribute with an empty value
XML:

Code: Select all

<element attr=""/>
Oxygen shows this attribute in the Attributes view with the name in bold (that signifies it's a specified attribute) and the value field contains the greyed text [Empty].

e.g. no attribute in the XML but the DTD declares it
XML:

Code: Select all

<element/>
DTD:

Code: Select all

<!ATTLIST element attr CDATA #IMPLIED>
Oxygen shows this attribute in the Attributes view with the plain name (that means it's an implied attribute) and the value field empty.

Oxygen doesn't have an option to filter attributes with empty values from the Attributes view, so my guess is it's the latter case. You probably have optional attributes declared in a DTD/schema but you have somehow lost the association with that DTD/schema and that's why Oxygen doesn't show those attribute anymore.

Check in the Properties view (main menu > Window < Show View > Properties) if Oxygen detected a DTD/schema for "Content completion".

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
JurgenVandenberghe
Posts: 2
Joined: Tue Aug 07, 2012 4:42 pm

Re: Attributes View doesn't show empty attributes

Post by JurgenVandenberghe »

I'm working in DITA.

And i have to correct myself: attributes with an empty value are shown, in grey.
I'm missing the "implied" attributes.

The Properties show this:

Name: [name of file]
Line separator: Unix-like [\n]
Path of current file: [path to the file]
Content-type: text/xml
Encoding: UTF8
Document type: DITA (/Applications/Author13.2/frameworks/dita/dita.framework)
CSS: file:/Applications/Author13.2/frameworks/dita/css_classed/dita.css
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: Attributes View doesn't show empty attributes

Post by Radu »

Dear Jurgen,

Is it possible that you edited the topic in the Text page and removed the DOCTYPE declaration from it?
A DTD-based DITA topic should have a DOCTYPE declaration before the root element like:

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "http://docs.oasis-open.org/dita/v1.1/OS/dtd/topic.dtd">
<topic id="topic-1">........
If Oxygen properly detects the DTD used for content completion, in the Properties view you should also have a Content Completion pointing to the used schema/DTD.


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