auto-complete enumerations
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 8
- Joined: Thu Oct 04, 2007 4:38 pm
- Location: NL
auto-complete enumerations
Hello,
Maybe I'm missing something but I cannot get this to work on Oxygen. Please help.
I have a XML file and a XSD file defining the W3C schema. In the XSD file I have created a simpleType XML element for string enumerations like this
In the XML file I use this enumeration. In Oxygen I only wish to edit using the regular Editor perspective and the Grid view on the XML file. Now when I modify a variable of this enumeration type there is no auto-completion, I still have to type in the enumeration value manually. Can I somehow enable auto-complete for my own enumeration in Oxygen? How?
Please advise. Thanks in advance.[/code]
Maybe I'm missing something but I cannot get this to work on Oxygen. Please help.
I have a XML file and a XSD file defining the W3C schema. In the XSD file I have created a simpleType XML element for string enumerations like this
Code: Select all
<xs:simpleType name = "Identifier">
<xs:annotation>
<xs:documentation>Indicates whether and how </xs:documentation>
</xs:annotation>
<xs:restriction base = "xs:string">
<xs:enumeration value = "STATIC"/>
<xs:enumeration value = "DYNAMIC_A"/>
<xs:enumeration value = "DYNAMIC_B"/>
</xs:restriction>
</xs:simpleType>
Please advise. Thanks in advance.[/code]
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
The content completion window just pops up automatically with the three enumeration values when you insert an element of type Identifier in an XML document based on the schema which defines Identifier. For example if you create and save the following XML Schema in oXygen:
and you create a new XML file based on this schema (menu File -> New, in the Create an XML document dialog select this schema in the URL field) the new XML document contains
If you press Enter after <identifier></identifier> and then you press < the content completion window pops up and contains the identifier element. When you insert an identifier element by pressing Enter on it in the content completion window the cursor is moved between the start tag and the end tag of the identifier element and the content completion window pops up again automatically with the three enumeration values. Can you reproduce this behavior in oXygen?
Regards,
Sorin
The content completion window just pops up automatically with the three enumeration values when you insert an element of type Identifier in an XML document based on the schema which defines Identifier. For example if you create and save the following XML Schema in oXygen:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name = "Identifier">
<xs:annotation>
<xs:documentation>Indicates whether and how </xs:documentation>
</xs:annotation>
<xs:restriction base = "xs:string">
<xs:enumeration value = "STATIC"/>
<xs:enumeration value = "DYNAMIC_A"/>
<xs:enumeration value = "DYNAMIC_B"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="root">
<xs:complexType>
<xs:sequence maxOccurs="10">
<xs:element name="identifier" type="Identifier"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ftopic2531.xsd">
<identifier></identifier>
</root>
Regards,
Sorin
-
- Posts: 8
- Joined: Thu Oct 04, 2007 4:38 pm
- Location: NL
Hello,
Yes I can reproduce this behavior using the Text view. However, my question concerned editing the contents of the XML file using the Grid view. If I edit the data content (ie edit a value field of type Identifier) of the XML file using the Grid view I don't seem to get any auto-completion.
EDIT:
Sorry, my bad, the root of my XML file read
instead of
This is why auto-completion was not working in Grid view. Thanks for your help sorin![/code]
Yes I can reproduce this behavior using the Text view. However, my question concerned editing the contents of the XML file using the Grid view. If I edit the data content (ie edit a value field of type Identifier) of the XML file using the Grid view I don't seem to get any auto-completion.
EDIT:
Sorry, my bad, the root of my XML file read
Code: Select all
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
Code: Select all
<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:/D:/OxygenTest/config.xsd">
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
If the attribute xsi:noNamespaceSchemaLocation contains a correct reference to the schema the auto-completion works correctly both in the text editor and in the grid editor. I did the following: I typed a wrong schema location, the auto-completion feature did not work in text editor or in grid editor, I corrected the schema location in the text editor without saving the file, auto-completion started working correctly, I switched to the grid editor, auto-completion still worked correctly. Do you get the same behavior?
Regards,
Sorin
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service