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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + How to add page number in to v... (2)
-> + XSL Grouping (7)
-> + Repeat images using FOR EACH l... (7)
-> + How to get File name (2)
-> + image and text on the same lin... (2)
-> + Create XSLT stylesheets for us... (2)
-> + Merge Multiple Files While Che... (2)
-> + xslt 3 level or multi level gr... (6)
-> + How to create xsl which will c... (2)
-> + xsl:variable and Result Tree F... (7)
-> - XSL-FO fo:table continued from... (1)
-> + XSLT Java issue (2)
-> + problem with hyperlink (4)
-> + substring-after function probl... (4)
-> + Xalan Processing (3)
-> + Memory utilization high with m... (2)
-> + check all parent node groups s... (2)
-> + CSV DOC to XML CONVERSION (11)
-> + XSLT: Ordered List (based on r... (4)
-> + XSLT Mapping - Issue (4)
-> + XSL following-sibling, how to ... (5)
-> + need xslt elements help (2)
-> + Dynamic generation of URL in X... (2)
-> + List Created from Section Navi... (2)
-> + xslt elements help (2)
-> + Map field if source is not nul... (3)
-> + XSLT group and sort whith gene... (4)
-> + Nested XML value (2)
-> + Specifying condition with coun... (4)
-> + xsl:function using found in er... (4)
-> + How to remove an unwanted spac... (2)
-> + Question about variable substi... (2)
-> + XSL for Comparing nodes and di... (4)
-> + External lookup list (8)
-> + XSL HTML output now needs to b... (2)
-> + Adding a new sub element to th... (4)
-> + How do I get rid of 'Tip' node... (9)
-> + Trying to dynamically create n... (2)
-> + Display XML link, using XSLT a... (9)
-> + calling templates based on ord... (2)
-> + How to add internal links usin... (4)
-> + How to call user defined java ... (3)
-> + XSLT and WebApps past and futu... (3)
-> + passing condition through java... (3)
-> + Apllying a template from withi... (4)
-> + Getting xsl element in javascr... (3)
-> + The document() function inside... (3)
-> + Footnote text move to para (2)
-> + XSL: multiple element come to ... (3)
-> + How to use following-sibling &... (2)
-> + How to use FOP 0.95 with Stylu... (4)
-> + Error during creating PDF from... (2)
-> + Help creating a comma delimite... (4)
-> + Selective Add using XSLT recur... (3)
-> + Help: convert without parent e... (2)
-> - Correct my substring function ... (1)
-> + Old xsl into reports (4)
-> + How to save xslt converted fil... (3)
-> + How to find non tagging text? (5)
-> + Help: Hex entity to Character... (6)
-> + EDI QUOTES MESSAGE NEED TO REP... (2)
-> + How to convert in multi level ... (4)
-> + Need some help with a styleshe... (3)
-> - Conditional Formattinf Formula... (1)
-> + Creating HTML Unordered LIsts.... (2)
-> + xslt params uknown number of i... (2)
-> + How to use fonts other than ba... (2)
-> - Converting existing HTML into ... (1)
-> + Help to tune up this XSLT (2)
-> + XSLT - is only converting the ... (2)
-> + XSLT Editor tab (4)
-> + Convert multiple files from XM... (2)
-> + how to use in select expressi... (2)
-> + Help needed in XSL transformat... (2)
-> + How to add a string with math ... (5)
-> + How to add a string with math ... (6)
-> - br element (1)
-> + Stylesheet directed terminatio... (2)
-> + Who can help me whit sum funct... (2)
-> + XSLT Works in Stylus Studio, n... (3)
-> - Filter by Attribute (1)
-> + Display x number of items whic... (6)
-> + MultiColumn Reporting (3)
-> + cant get namespace declaration... (3)
-> + Performance xsl:for each and n... (3)
-> + How to assign value to a XSLT ... (3)
-> + Select element value based on ... (2)
-> + Version 10 of Saxon? (8)
-> + How to get the value of a node... (5)
-> + Display Xpath using (4)
-> + XSLT to report (2)
-> + xslt help for a noobie (2)
-> + XSL-FO XML to PDF with XSLT (3)
-> + Using XSLT to transform XML to... (4)
-> + XSLT to sort a list alphabetic... (4)
-> + How to Get Colum Values based ... (2)
-> + non persisting predicate filte... (5)
-> + HTML to XSLT (2)
-> + extra carriage returns in "csv... (2)
-> + extra carriage returns in "csv... (3)
-- Previous [301-320] [321-340] [341-360] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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

   
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.