Page 1 of 1
Attributes View doesn't show empty attributes
Posted: Tue Aug 07, 2012 4:49 pm
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 !
Re: Attributes View doesn't show empty attributes
Posted: Tue Aug 07, 2012 5:30 pm
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:
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:
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
Re: Attributes View doesn't show empty attributes
Posted: Tue Aug 07, 2012 5:47 pm
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
Re: Attributes View doesn't show empty attributes
Posted: Wed Aug 08, 2012 10:32 am
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