Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml output using xsl

Status
Not open for further replies.

marks20101

Programmer
Oct 6, 2005
3
US
I'm trying to get the xml to result like this:

<SourceGroup Name="1anthonyphil_geese" RolloverType="-1" RolloverSourceGroup="WMENC_SOURCEGROUP_AUTOROLLOVER_TO_NEXT">
<Source Type="WMENC_AUDIO" Scheme="file" InputSource="F:\wave_files\anthonyphillips\thegeeseghost\geeseghost_pt1.wav">
</Source>
<Source Type="WMENC_SCRIPT" Scheme="userscript">
</Source>
<EncoderProfile id="Multiple bit rates audio (CBR) / Script High" />
</SourceGroup>
<SourceGroup Name="2cousteau_heaveyweather" RolloverType="-1" RolloverSourceGroup="WMENC_SOURCEGROUP_AUTOROLLOVER_TO_NEXT">
<Source Type="WMENC_AUDIO" Scheme="file" InputSource="F:\wave_files\cousteau\sirena\heavyweather.wav">
</Source>
<Source Type="WMENC_SCRIPT" Scheme="userscript">
</Source>
<EncoderProfile id="Multiple bit rates audio (CBR) / Script High" />
</SourceGroup>.........ect........

The XSL is here: The desired xml(source) is here:
You will have to right click to see the source.

I want all three rows from the xml file(from NAME_SEGMENT and INPUT_SOURCE) these become attributes in the resulting xml.
My problem is that I can not view the resulting xml (in xml format or any format) that calls the xsl, I just get a blank html page? How do I process this xml to become the desired resulting xml using xsl? So that I could save the result xml file in xml format. (I think I need to add a top level tag in the xsl for a start? Only one top level tag is this correct?)

Thanks hope all is clear
Mark..................
 
Its not viewing because the browser it trying to output it as HTML (I presume), so it is blank.

I use xmlspy to do my transforms, its a great tool. They have a home version which is free (permanently) to use:


Or you could use a command line tool such as msxsl (microsoft) or Saxon

Jon

"I don't regret this, but I both rue and lament it.
 
Thanks Jon, I see that Altova has a text view very nice. Can you view my code, because the result gives me only one row of data and I would need all the rows from the xml source. I'm not sure if the xsl is contructed right for this.

Thanks for your help!
Mark
 
Disregard that last request. I had to add <xsl:for-each select="ROWSET/ROW"> clause and omit ROWSET/ROW from the <xsl:value-of select="NAME_SEGMENT"/> clause
Thanks much!
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top