Importing Enumerations
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 1
- Joined: Tue Jul 16, 2013 1:37 am
Importing Enumerations
Post by Oxygen14User »
Hi
I am trying to create an XML Schema and want to define a 'Country' field that is restricted to a set of known countries. I can type in each allowable country as an enumeration in the facets panel but, is there any way to load a list of countries into the facets panel from say a CSV or text file so I don't have type in each country enumeration by hand?
Thanks for any help
I am trying to create an XML Schema and want to define a 'Country' field that is restricted to a set of known countries. I can type in each allowable country as an enumeration in the facets panel but, is there any way to load a list of countries into the facets panel from say a CSV or text file so I don't have type in each country enumeration by hand?
Thanks for any help
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Importing Enumerations
Hi,
Unfortunately you can't import/load the list of countries from a file directly to the Facets panel. However, you could import a CSV/text file into XML in Oxygen (File > Import > Text File) and then post process that with an XSL to produce the xs:enumeration values.
Alternatively, instead of post-processing the XML you could use the Grid mode to copy data around.
1. First import the CSV to XML, switch to Grid mode (Document > Edit mode > Grid), select the entire list (from first to last items) and copy to clipboard.
If you have a country list formatted with one country per line, you could simply copy that to clipboard without importing it to XML.
2. Make sure you have declared at least two enumerations in the schema, switch to Grid mode (Document > Edit mode > Grid), expand it to the place where the enumeration is, select the first value and paste there the list from the clipboard.
Regards,
Adrian
Unfortunately you can't import/load the list of countries from a file directly to the Facets panel. However, you could import a CSV/text file into XML in Oxygen (File > Import > Text File) and then post process that with an XSL to produce the xs:enumeration values.
Alternatively, instead of post-processing the XML you could use the Grid mode to copy data around.
1. First import the CSV to XML, switch to Grid mode (Document > Edit mode > Grid), select the entire list (from first to last items) and copy to clipboard.
If you have a country list formatted with one country per line, you could simply copy that to clipboard without importing it to XML.
2. Make sure you have declared at least two enumerations in the schema, switch to Grid mode (Document > Edit mode > Grid), expand it to the place where the enumeration is, select the first value and paste there the list from the clipboard.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
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