Subject:XML to non-xml format Author:Spencer Shearer Date:11 May 2005 03:08 PM
I have an XML file that I need to convert to non-xml format. The format of the file that I need to convert to is as follows. (Note: I have inserted line breaks before each one of the <or> for readability. The actual output file should not have the line breaks before the <or>.
#BIF File Built off the XML data format SDN list
sdnEntry: 6927
queryText: Bazul Dullah <in> firstName <and> Jack <in> lastName
<or> Bazul <in> lastName <and> Billy <in> firstName
<or> Bazul <in> lastName <and> Bart <in> firstName
<or> Bazul <in> lastName <and> Billy Jack <in> firstName
<or> Jack <in> lastName <and> Bazul Sampson <in> firstName
<or> Mortson <in> lastName <and> Bazul <in> firstName
<or> Bart <in> lastName <and> Bazul <in> firstName
<or> Jack <in> lastName <and>Bazul <in> firstName
<or> Harpoon <in> lastName
<or> Rush <in> lastName
<or> Bazul <in> lastName <and> Harpoon <in> firstName
<or> Bazul <in> lastName <and> Rush <in> firstName
<or> Meatwad <in> lastName <and> Fredrick Billy <in> firstName
<or> HAROUN <in> lastName <and> Fadhil <in> firstName
<or> AL Preist <in> lastName <and> Joe Seif <in> firstName
<or> Kline <in> lastName <and> Joe <in> firstName
<or> Galvante <in> lastName <and> Joe <in> firstName
<or> Galvante <in> lastName <and> Ray Billy Jack <in> firstName
<or> Jack <in> lastName <and> Johnson <in> firstName
<<EOD>>
The following XML is snippet that I took from a larger file. I had hoped to do the conversion using Stylus Studio but am getting stuck.
<xsl:template match="/">
#BIF File Built off the XML data format SDN list
sdnEntry: <xsl:value-of select="/sdnEntry/uid"/>
queryText: <xsl:value-of select="/sdnEntry/firstName"/> <in> firstName <and> <xsl:value-of select="/sdnEntry/lastName"/> <in> lastName <xsl:apply-templates select="sdnEntry/akGalvantest/aka"/>
<<EOD>>
</xsl:template>