Importing text files & empty tags
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 47
- Joined: Mon Jun 26, 2006 10:40 pm
Importing text files & empty tags
All -
does anyone have a recommendation for importing text files (from tab delimited excel sheets) and avoiding empty tags? I've tried changing the settings under Preferences>Database>Import: "Create empty elements for empty values".
Here are some samples:
Text file =
fileName dateScanned bw/color initials caption description genre firstName lastName unknown dateCreated boxNo folderNo topic1 topic2 topic3 topic4 geo1 geo2 geo3 nameSubject1 nameSubject2 nameSubject3 nameSubject4 nameSubject5 nameSubject6 nameSubject7 nameSubject8 nameSubject9 nameSubject10 temporal
aai0039 10-19-09 bw gc Students - 1921 "Group of 5 boys, 1 girl in the background" photograph Unknown 1921 61 20 Students Boys Girls "Gatlinburg, Tennessee" "Founding of Pi Beta Phi Settlement School, Gatlinburg, Tennessee, 1909-1927"
What I'd like to get:
XML =
<row>
<fileName>aai0039</fileName>
<dateScanned>10-19-09</dateScanned>
<bw_color>bw</bw_color>
<initials>gc</initials>
<caption>Students - 1921</caption>
<description>"Group of 5 boys, 1 girl in the background"</description>
<genre>photograph</genre>
<unknown>Unknown</unknown>
<dateCreated>1921</dateCreated>
<boxNo>61</boxNo>
<folderNo>20</folderNo>
<topic1>Students</topic1>
<topic2>Boys</topic2>
<topic3>Girls</topic3>
<geo1>"Gatlinburg, Tennessee"</geo1>
<temporal>"Founding of Pi Beta Phi Settlement School, Gatlinburg, Tennessee, 1909-1927"</temporal>
</row>
And this is what I'm actually getting when I import the file:
Reality =
<row>
<fileName>aai0039</fileName>
<dateScanned>10-19-09</dateScanned>
<bw_color>bw</bw_color>
<initials>gc</initials>
<caption>Students - 1921</caption>
<description>"Group of 5 boys, 1 girl in the background"</description>
<genre>photograph</genre>
<firstName></firstName>
<lastName></lastName>
<unknown>Unknown</unknown>
<dateCreated>1921</dateCreated>
<boxNo>61</boxNo>
<folderNo>20</folderNo>
<topic1>Students</topic1>
<topic2>Boys</topic2>
<topic3>Girls</topic3>
<topic4></topic4>
<geo1>"Gatlinburg, Tennessee"</geo1>
<geo2></geo2>
<geo3></geo3>
<nameSubject1></nameSubject1>
<nameSubject2></nameSubject2>
<nameSubject3></nameSubject3>
<nameSubject4></nameSubject4>
<nameSubject5></nameSubject5>
<nameSubject6></nameSubject6>
<nameSubject7></nameSubject7>
<nameSubject8></nameSubject8>
<nameSubject9></nameSubject9>
<nameSubject10></nameSubject10>
<temporal>"Founding of Pi Beta Phi Settlement School, Gatlinburg, Tennessee, 1909-1927"</temporal>
</row>
Also, I get the same results when I try to directly import the excel file, and skip using the tab delimited file. Can anyone lend me a hand with this or offer some suggestions?
Thanks so much,
B Dyson-Smith
does anyone have a recommendation for importing text files (from tab delimited excel sheets) and avoiding empty tags? I've tried changing the settings under Preferences>Database>Import: "Create empty elements for empty values".
Here are some samples:
Text file =
fileName dateScanned bw/color initials caption description genre firstName lastName unknown dateCreated boxNo folderNo topic1 topic2 topic3 topic4 geo1 geo2 geo3 nameSubject1 nameSubject2 nameSubject3 nameSubject4 nameSubject5 nameSubject6 nameSubject7 nameSubject8 nameSubject9 nameSubject10 temporal
aai0039 10-19-09 bw gc Students - 1921 "Group of 5 boys, 1 girl in the background" photograph Unknown 1921 61 20 Students Boys Girls "Gatlinburg, Tennessee" "Founding of Pi Beta Phi Settlement School, Gatlinburg, Tennessee, 1909-1927"
What I'd like to get:
XML =
<row>
<fileName>aai0039</fileName>
<dateScanned>10-19-09</dateScanned>
<bw_color>bw</bw_color>
<initials>gc</initials>
<caption>Students - 1921</caption>
<description>"Group of 5 boys, 1 girl in the background"</description>
<genre>photograph</genre>
<unknown>Unknown</unknown>
<dateCreated>1921</dateCreated>
<boxNo>61</boxNo>
<folderNo>20</folderNo>
<topic1>Students</topic1>
<topic2>Boys</topic2>
<topic3>Girls</topic3>
<geo1>"Gatlinburg, Tennessee"</geo1>
<temporal>"Founding of Pi Beta Phi Settlement School, Gatlinburg, Tennessee, 1909-1927"</temporal>
</row>
And this is what I'm actually getting when I import the file:
Reality =
<row>
<fileName>aai0039</fileName>
<dateScanned>10-19-09</dateScanned>
<bw_color>bw</bw_color>
<initials>gc</initials>
<caption>Students - 1921</caption>
<description>"Group of 5 boys, 1 girl in the background"</description>
<genre>photograph</genre>
<firstName></firstName>
<lastName></lastName>
<unknown>Unknown</unknown>
<dateCreated>1921</dateCreated>
<boxNo>61</boxNo>
<folderNo>20</folderNo>
<topic1>Students</topic1>
<topic2>Boys</topic2>
<topic3>Girls</topic3>
<topic4></topic4>
<geo1>"Gatlinburg, Tennessee"</geo1>
<geo2></geo2>
<geo3></geo3>
<nameSubject1></nameSubject1>
<nameSubject2></nameSubject2>
<nameSubject3></nameSubject3>
<nameSubject4></nameSubject4>
<nameSubject5></nameSubject5>
<nameSubject6></nameSubject6>
<nameSubject7></nameSubject7>
<nameSubject8></nameSubject8>
<nameSubject9></nameSubject9>
<nameSubject10></nameSubject10>
<temporal>"Founding of Pi Beta Phi Settlement School, Gatlinburg, Tennessee, 1909-1927"</temporal>
</row>
Also, I get the same results when I try to directly import the excel file, and skip using the tab delimited file. Can anyone lend me a hand with this or offer some suggestions?
Thanks so much,
B Dyson-Smith
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
In the current version (8.0) the option "Create empty elements for empty values" applies only to import from database operations. As you can see the path of the panel with that option is Database -> Import. We will consider extending this option to the import from text file and import from spreadsheet operations. In the current version you can remove the empty tags by applying an XSLT stylesheet to the result of the import operation.
Regards,
Sorin
In the current version (8.0) the option "Create empty elements for empty values" applies only to import from database operations. As you can see the path of the panel with that option is Database -> Import. We will consider extending this option to the import from text file and import from spreadsheet operations. In the current version you can remove the empty tags by applying an XSLT stylesheet to the result of the import operation.
Regards,
Sorin
-
- Posts: 47
- Joined: Mon Jun 26, 2006 10:40 pm
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
You can find a link to a website containing an XSLT tutorial on the Tutorials and XML APIs page of the oXygen website. You can find the XSLT tutorial here.
Regards,
Sorin
You can find a link to a website containing an XSLT tutorial on the Tutorials and XML APIs page of the oXygen website. You can find the XSLT tutorial here.
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello Bridger,
Regards,
Sorin
We extended the import options to the import from text file and import from spreadsheet operations. The Import preferences page was moved to the XML group of panels as it is applied now to all import operations. It will be available in the next version of oXygen, that is version 8.2.sorin wrote:We will consider extending this option to the import from text file and import from spreadsheet operations.
Regards,
Sorin
Return to “General XML Questions”
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