Click here to Skip to main content
       

Web Development

 
GeneralRe: SMTP Programming PinmemberDisIsHoody10-Dec-12 13:30 
GeneralRe: SMTP Programming PinmvpRichard MacCutchan10-Dec-12 21:36 
GeneralRe: SMTP Programming PinmemberDisIsHoody11-Dec-12 9:40 
GeneralRe: SMTP Programming PinmvpRichard MacCutchan11-Dec-12 10:26 
GeneralRe: SMTP Programming PinmemberDisIsHoody11-Dec-12 10:44 
GeneralRe: SMTP Programming PinmvpRichard MacCutchan11-Dec-12 10:58 
GeneralRe: SMTP Programming PinmemberDisIsHoody11-Dec-12 11:20 
QuestionXSLT Transforms - how to get just some of in a for-each PinmemberQuickBooksDev8-Dec-12 2:26 
We use XSLT to convert various XML files into tab delimited.
 
Some of the XML input files have a variable number of options.   Sometimes none, others 1,2,3 or more.
 
This makes the formatting difficult since there is also a header row that is created in the XSLT file that must have the exact number of columns and proper header context.
 
So the question is how to get this formatted correctly since if we provide for 2 sets of opts (from the W3Schools tryit) in the header row how to get the for-each to stop at 2.
 
     <cd>
          &lt;title>Eros&lt;/title>
          <artist>Eros Ramazzotti</artist>
          <country>EU</country>
          <company>BMG</company>
          <price>9.90</price>
          <year>1997</year>
     </cd>
     <cd>
<opts length="3">
<opt><name>Nm1</name><val>111</val></opt>
<opt><name>Nm2</name><val>222</val></opt>
<opt><name>Nm3</name><val>333</val></opt>
 
</opts>
 
Typical for-each
<xsl:for-each select="opts/opt">
   <td><xsl:value-of select="name"/></td>
   <td><xsl:value-of select="val"/></td>
</xsl:for-each>
 
In this case there will be 3 sets of opts but 2 sets of headers and all data after this will be off.
 
Tried using xls:when test="@length =...' but don't see a way of just getting 2 of the 3 opts.
 
Can anyone help?
 
Thanks
AnswerRe: XSLT Transforms - how to get just some of in a for-each PinmemberChris Grove13-Dec-12 19:46 
GeneralRe: XSLT Transforms - how to get just some of in a for-each [modified] PinmemberQuickBooksDev17-Dec-12 0:42 
GeneralRe: XSLT Transforms - how to get just some of in a for-each PinmemberChris Grove17-Dec-12 3:43 
GeneralRe: XSLT Transforms - how to get just some of in a for-each PinmemberQuickBooksDev17-Dec-12 4:55 
GeneralRe: XSLT Transforms - how to get just some of in a for-each PinmemberChris Grove17-Dec-12 5:43 
QuestionPop Up JQuery Quick Link PinmemberJaniel Major5-Dec-12 22:02 
AnswerRe: Pop Up JQuery Quick Link Pinmembervbmike7-Dec-12 4:09 
AnswerRe: Pop Up JQuery Quick Link Pinmemberryanb3112-Dec-12 4:41 
Question[HELP] Whois can using PHP to generate this one? Pinmemberjimmy.suharry4-Dec-12 21:37 
AnswerRe: [HELP] Whois can using PHP to generate this one? PinmemberS.M. Zamshed Farhan12-Jan-13 5:54 
QuestionTool for big WEB project with huge loads PinmemberJunoli2-Dec-12 9:37 
AnswerRe: Tool for big WEB project with huge loads PinmemberRichard A. Abbott2-Dec-12 10:47 
Questionselect an item in gridview Pinmemberptvce2-Dec-12 1:50 
AnswerRe: select an item in gridview PinmvpRichard MacCutchan2-Dec-12 3:00 
Questioni php question Pinmembergamaan1-Dec-12 4:00 
AnswerRe: i php question Pinmembergamaan1-Dec-12 4:03 
AnswerRe: i php question PinmemberS.M. Zamshed Farhan12-Jan-13 6:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 11 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid