XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 09:26 AM
Originally Posted: 19 Feb 2009 09:24 AM
OK, I am not a programmer, at all. I've been studing XSL, XML, and CSS for the past 2 days to design a sound report that uses this language to pull it all together. I've got a simple layout that still needs formatting, that I am comfortable doing with my limited knowledge. However, I've run into a snag, and hope someone here might be able to help me out. This what I've got for the XSL sheet. This only for the section I am trying to do, not the whole XSL sheet.

<table class="recordings">
<tr class="header">
<th>Scene</th>
<th>Take</th>
<th>File</th>
<th>Timecode</th>
<th>Track 1</th>
<th>Track 2</th>
<th>Track 3</th>
<th>Track 4</th>
<th>Track 5-8</th>

</tr>
<xsl:for-each select="SESSION/RECORDING">
<xsl:variable name="i" select="position()"/>
<xsl:variable name="oddeven" select="substring('evenodd', ($i mod 2) * 4 + 1, 4 - ($i mod 2))"/>
<tr><xsl:attribute name="class"><xsl:value-of select="$oddeven"/></xsl:attribute>
<td><xsl:value-of select="BWFXML[1]/SCENE"/></td>
<td><xsl:value-of select="BWFXML[1]/TAKE"/></td>
<td><xsl:value-of select="BWFXML[1]/FILE_SET/FILENAME"/></td>
<td><xsl:value-of select="BWFXML[1]/SPEED/TIMESTAMP_TEXT"/></td>

<xsl:if test="BWFXML[1]/TRACK_LIST/TRACK_COUNT !=''">

<xsl:for-each select="BWFXML[1]/TRACK_LIST/TRACK">
<td class="pre"><xsl:value-of select="NAME"/></td>
</xsl:for-each>

</xsl:if>
</tr>

<xsl:if test="BWFXML[1]/NOTE != ''">
<tr><xsl:attribute name="class"><xsl:value-of select="$oddeven"/></xsl:attribute>
<th class="alert">note:</th>
<td colspan="5"><xsl:value-of select="BWFXML[1]/NOTE"/></td>
</tr>
</xsl:if>

</xsl:for-each>
</table>


This puts each "NAME" in a separate column. How would I get the "NAME" children into one column that can span all columns without growing the other columns? I hope that makes sense. I can provide other info if needed. Here's the XML. I would also like to include the <INTERLEAVE_INDEX> next to each <NAME> but I have a work around if that's asking too much. Thanks! I hope I am not asking too much!

Michael

<SESSION>
<RECORDING>
<BWFXML>
<IXML_VERSION>1.5</IXML_VERSION>
<PROJECT></PROJECT>
<SCENE>401</SCENE>
<SLATE></SLATE>
<TAKE>1</TAKE>
<TAPE>1301</TAPE>
<COUNT>1</COUNT>
<FILE_UID>VOSBR700000200902181927453390001</FILE_UID>
<NOTE></NOTE>
<CIRCLED>FALSE</CIRCLED>
<SPEED>
<TIMECODE_RATE>30000/1001</TIMECODE_RATE>
<TIMECODE_FLAG>DF</TIMECODE_FLAG>
<HARDWARE_SAMPLE_RATE>44100</HARDWARE_SAMPLE_RATE>
<DIGITIZER_SAMPLE_RATE>44100</DIGITIZER_SAMPLE_RATE>
<FILE_SAMPLE_RATE>44100</FILE_SAMPLE_RATE>
<AUDIO_BIT_DEPTH>16</AUDIO_BIT_DEPTH>
<AUDIO_ENCODING>PCM int</AUDIO_ENCODING>
<TIMESTAMP_TEXT>19:27:45:14</TIMESTAMP_TEXT>
<TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO>3089884339</TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO>
<TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI>0</TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI>
<TIMESTAMP_SAMPLE_RATE>44100</TIMESTAMP_SAMPLE_RATE>
<DURATION_SAMPLES>275456</DURATION_SAMPLES>
<DURATION_TEXT>00:00:06:07</DURATION_TEXT>
</SPEED>
<SYNC_POINT_LIST>
<SYNC_POINT>
<SYNC_POINT_TYPE>ABSOLUTE</SYNC_POINT_TYPE>
<SYNC_POINT_FUNCTION>SLATE_GENERIC</SYNC_POINT_FUNCTION>
<SYNC_POINT_COMMENT>TC1</SYNC_POINT_COMMENT>
<SYNC_POINT_LOW>3089884339</SYNC_POINT_LOW>
<SYNC_POINT_HIGH>0</SYNC_POINT_HIGH>
<SYNC_POINT_EVENT_DURATION>0</SYNC_POINT_EVENT_DURATION>
</SYNC_POINT>
</SYNC_POINT_LIST>
<FILE_SET>
<FILENAME>4011.wav</FILENAME>
<TOTAL_FILES>1</TOTAL_FILES>
<FAMILY_UID>VOSBR700000200902181927453390000</FAMILY_UID>
<FAMILY_NAME>401/1</FAMILY_NAME>
<FILE_SET_INDEX>1</FILE_SET_INDEX>
</FILE_SET>
<TRACK_LIST>
<TRACK_COUNT>9</TRACK_COUNT>
<TRACK>
<CHANNEL_INDEX>1</CHANNEL_INDEX>
<INTERLEAVE_INDEX>1</INTERLEAVE_INDEX>
<NAME>Mix Track</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>2</CHANNEL_INDEX>
<INTERLEAVE_INDEX>2</INTERLEAVE_INDEX>
<NAME>Lav</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>3</CHANNEL_INDEX>
<INTERLEAVE_INDEX>3</INTERLEAVE_INDEX>
<NAME>Plant Mic 1</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>4</CHANNEL_INDEX>
<INTERLEAVE_INDEX>4</INTERLEAVE_INDEX>
<NAME>Plant Mic 2</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>5</CHANNEL_INDEX>
<INTERLEAVE_INDEX>5</INTERLEAVE_INDEX>
<NAME>Boom</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>6</CHANNEL_INDEX>
<INTERLEAVE_INDEX>6</INTERLEAVE_INDEX>
<NAME>Lav 1</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>7</CHANNEL_INDEX>
<INTERLEAVE_INDEX>7</INTERLEAVE_INDEX>
<NAME>Lav 2</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>8</CHANNEL_INDEX>
<INTERLEAVE_INDEX>8</INTERLEAVE_INDEX>
<NAME>Lav 3</NAME>
</TRACK>
<TRACK>
<CHANNEL_INDEX>13</CHANNEL_INDEX>
<INTERLEAVE_INDEX>9</INTERLEAVE_INDEX>
<NAME>TC</NAME>
</TRACK>
</TRACK_LIST>
<BEXT>
<BWF_DESCRIPTION>bPROJECT=
bSCENE=401
bSLATE=
bTAKE=1
bTAPE=1301
bSPEED=029.970-DF
bFILENAME=4011.wav
bNOTE=
</BWF_DESCRIPTION>
<BWF_ORIGINATOR>Boom Recorder 7.22</BWF_ORIGINATOR>
<BWF_ORIGINATOR_REFERENCE>VOSBR700000200902181927453390001</BWF_ORIGINATOR_REFERENCE>
<BWF_ORIGINATION_DATE>2009-02-18</BWF_ORIGINATION_DATE>
<BWF_ORIGINATION_TIME>19:27:45</BWF_ORIGINATION_TIME>
<BWF_TIMEREFERENCE_LOW>3089884339</BWF_TIMEREFERENCE_LOW>
<BWF_TIMEREFERENCE_HIGH>0</BWF_TIMEREFERENCE_HIGH>
<BWF_VERSION>1.0</BWF_VERSION>
<BWF_UMID></BWF_UMID>
<BWF_RESERVED></BWF_RESERVED>
<BWF_CODING_HISTORY>A=PCM,F=44100,W=32,M=9ch
A=PCM,F=44100,W=16,M=9ch
</BWF_CODING_HISTORY>
</BEXT>
<VOSGAMES>
<CONTACT_INFO></CONTACT_INFO>
<SESSION_NOTE></SESSION_NOTE>
</VOSGAMES>
</BWFXML>
</RECORDING>

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 19 Feb 2009 09:33 AM
post your full xml and full xsl and full desired output and I will look it over

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 10:07 AM
Originally Posted: 19 Feb 2009 09:52 AM
ok will do

The PDF of the Sound Report is what I get, not what I want. I would like to get the Track children to show up on a new row, but not to put the children in each column. Perhaps a span of columns, evenly spaced, but not to the width of the other columns. Just a simple spacing that doesn't look cluttered.

Thanks

Michael


DocumentTVShowSoundReport.pdf
Sound Report

Documentsoundreport.xml
XML Sheet

Unknownsoundreport.html.xsl
XSL sheet

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 19 Feb 2009 10:05 AM
I get parsing/validation errors

E [Saxon6.5.5] Attribute media_type is not allowed on this element

E [Saxon6.5.5] Only xsl:when and xsl:otherwise are allowed here

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 10:08 AM
you need the css, right?


Documentsoundreport.css
CSS

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 19 Feb 2009 10:11 AM
media_type should be media-type in the <xsl:output element

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 10:15 AM
this is what was generated by the program for the files in the pdf sound report. the last one was from another sound report. Not sure that would matter, but this one was generated last. Is that something the program itself is doing. It works and makes the reports on my end. Do I need to change it?

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 10:19 AM
Excuse my ignorance for a sec, but is that in the xsl document? I don't see it anywhere.

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 10:22 AM
OK, I found it. That was put there by the programmer of the software. I am working off of a template he provided. I'm just moving things around, and formatting. Should I change that? Like said before, it works.

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 19 Feb 2009 10:44 AM
are you trying to produce a pdf document?

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 11:25 AM
Originally Posted: 19 Feb 2009 11:20 AM
Ultimately, Yes. This PDF(of the html), via print(Mac), will travel with the sound files created. If I include the proper documents(.css), I could just copy over the html document that gets generated. And it will open as an html. Which I might do, so I could link the file names and the audio file opens up.

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 19 Feb 2009 11:24 AM
I don't know anything about mac. i get validation/parsing errors when I load the file. To create a pdf document you usually use xsl-fo. Html to pdf is not the usual route

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 11:28 AM
Do you need me to re-post the xsl with the media_type changed?

The pdf function is a simple print command of the screen, on a mac. Don't be scared:) So no need to change programming for that.

I want an html document generated from the xsl, so nothing strange there. I just "print" it, to get the pdf.

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 11:30 AM
here it is....


Documentsoundreport.html(1).xsl
XSL sheet

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 19 Feb 2009 11:38 AM
i can't help you when you change the files

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 19 Feb 2009 11:42 AM
there is something wrong with the forum, its double/triple posting and playing up

Postnext
Minollo I.Subject: Help with grouping children, for a newbie
Author: Minollo I.
Date: 19 Feb 2009 12:30 PM
That typically happens when a poster hits "refresh" on the browser after having submitted a post. That triggers another identical post...

Postnext
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 19 Feb 2009 11:43 AM
I'm not quite sure what you need from me?

Postnext
John BamptonSubject: Help with grouping children, for a newbie
Author: John Bampton
Date: 20 Feb 2009 05:11 AM
I would like to get the Track children to show up on a new row, but not to put the children in each column. Perhaps a span of columns, evenly spaced, but not to the width of the other columns. Just a simple spacing that doesn't look cluttered.

I have looked at the pdf. Which are the track children?

Posttop
Michael ClarkSubject: Help with grouping children, for a newbie
Author: Michael Clark
Date: 20 Feb 2009 10:20 AM
Thanks for your help on this but I think I managed to get in the ball park for what I want

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.