Can oxygen 10 convert XML to Tab delimited file ??

Questions about XML that are not covered by the other forums should go here.
rajendrasedhain
Posts: 10
Joined: Mon Oct 27, 2008 7:50 pm

Can oxygen 10 convert XML to Tab delimited file ??

Post by rajendrasedhain »

I have a xml file and I want to convert it into tab delimited file. Currently, I am using Oxygen XML editor 10. Is there anyway to do this or not, if not please can you provide the code ?

Thanks
-Raj
rajendrasedhain
Posts: 10
Joined: Mon Oct 27, 2008 7:50 pm

Re: Can oxygen 10 convert XML to Tab delimited file ??

Post by rajendrasedhain »

I am new on this product <oxygen>

please help me to figure out to convert XML file to tab delimited file.

Thanks
-Raj
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Can oxygen 10 convert XML to Tab delimited file ??

Post by sorin_ristache »

Hello,

You need to apply an XSLT stylesheet on the XML file which outputs the tab delimited file based on the input XML file. The XSLT stylesheet depends on the structure of the input XML file. In case there is no XSLT stylesheet available yet for the format of your input XML file you will have to write the stylesheet yourself. The XSLT editor and the XSLT Input view will assist you to do that in Oxygen.


Regards,
Sorin
rajendrasedhain
Posts: 10
Joined: Mon Oct 27, 2008 7:50 pm

Re: Can oxygen 10 convert XML to Tab delimited file ??

Post by rajendrasedhain »

Thank you sorin, it helps me a lot i'll try to write the style sheet,if any problem, i'll remember you again.

Thanks
rajendrasedhain
Posts: 10
Joined: Mon Oct 27, 2008 7:50 pm

Re: Can oxygen 10 convert XML to Tab delimited file ??

Post by rajendrasedhain »

hi george and all,

<?xml version="1.0" encoding="utf-8"?>


Source:
SRS

NumberIdentifier:
OCoLC

Date:
871116

RecorderIdentifier:
ocm16990104

MARCProcessingInfo:
NUI


How can I give the tab and related items below of that header.e.g

source NumberIdentifier Date RecordIdentifier MARCProcessingInfo
SRS OCoLC 871116 OCM16990104 NUI


AND also I am able to read only for a <a:data> to </a:data>. there are other a:data and how I can loop and read and put below the header as above ?

Thanks
rajendrasedhain
Posts: 10
Joined: Mon Oct 27, 2008 7:50 pm

Re: Can oxygen 10 convert XML to Tab delimited file ??

Post by rajendrasedhain »

Hi Sorin,
I have problem please help me to figure out.
How can I convert XML to tab delimited file.....

My result is in a line, I can't break the line,when I use <br/> it comes with the output.I am new in this language I hope you'll help me to figure out.

My style sheet:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xpath-default-namespace="http://purl.org/dc/elements/1.1/"
xmlns:oclcterms="http://purl.org/oclc/terms/"
xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<xsl:template match="dctermset">

Source: NumberIdentifier: Date:

<xsl:element name="table">
<xsl:element name="tr">
<xsl:element name="td">
<xsl:for-each select="*">
<xsl:value-of select="oclcterms:recordContentSource" xml:space="">
</xsl:value-of>
</xsl:for-each>

</xsl:element>
</xsl:element>

<xsl:for-each select="*">
<xsl:value-of select="oclcterms:recordControlNumberIdentifier" separator="#x20"></xsl:value-of>

</xsl:for-each>

<xsl:for-each select="*">
<xsl:value-of select="oclcterms:recordCreationDate" separator="#x20"></xsl:value-of>

</xsl:for-each>

</xsl:element>

</xsl:template>
<xsl:strip-space elements=""/>

</xsl:stylesheet>

MY XML file:

<?xml version="1.0" encoding="UTF-8" ?>
<dctermset><oclcdcq xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oclcterms="http://purl.org/oclc/terms/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<oclcterms:recordContentSource>SRS</oclcterms:recordContentSource>
<oclcterms:recordControlNumberIdentifier xsi:type="http://purl.org/oclc/terms/marcorg">OCo ... Identifier>
<oclcterms:recordCreationDate xsi:type="http://purl.org/oclc/terms/marc008date" ... eationDate>
<oclcterms:recordIdentifier xsi:type="http://purl.org/oclc/terms/oclcrecordnu ... Identifier>
<oclcterms:OCLC-MARCProcessingInformation xsi:type="http://purl.org/oclc/terms/oclcorg">NUI ... nformation>
<oclcterms:OCLC-MARCProcessingInformation xsi:type="http://purl.org/oclc/terms/transactionc ... nformation>
<oclcterms:recordTranscribingAgency>SRS</oclcterms:recordTranscribingAgency>
<dc:contributor>United States. Dept. of Agriculture.</dc:contributor>
<dcterms:issued>1987?]</dcterms:issued>
<dc:description>Shipping list no.: 87-82-P.</dc:description>
<dcterms:extent>1 poster : col. ; 56 x 44 cm.</dcterms:extent>
<dc:language xsi:type="http://purl.org/dc/terms/ISO639-2">eng</dc:language>
<dc:publisher>U.S. Dept. of Agriculture</dc:publisher>
<dc:subject xsi:type="http://purl.org/dc/terms/LCSH">Conservation of natural resources--United States--Posters.</dc:subject>
<dc:subject>A 1.32:Am 3/2</dc:subject>
<dc:title>America's resources need your help!</dc:title>
<dc:type>Image</dc:type>
</oclcdcq>
<dctermset>

Thanks
-Raj
Post Reply