XSL - output html pages to folders depending on attribute selection

MyChemicalSelf

New Member
Follow this link for a ** (hopefully) **better explanation of this task!With the following excel-spreadsheet:\[code\]|No|Product|Lang1Name|Lang1Desc|Lang2Name|Lang2Desc|Lang3Name|Lang3Desc|...\[/code\]How do I a) setup my xml-file for the language part andb) use xsl to create a folder structure and create webpages depending on the language?Example: \[code\] lang1Folder -> lang1HtmlPages lang2Folder -> lang2HtmlPages lang3Folder -> lang3HtmlPages\[/code\]so that I can build my html table and only have one language in that table and all webpages of one language are saved in the according language folder.Here's what I was thinking for my xml-file:\[code\]<table><info nr="1" lang1name = "Lang1 Name" lang2name="Lang2 Name" lang3name="Lang3 Name"/><description lang1desc="Lang1 Description" lang2desc="Lang2 Description" lang3desc="Lang3 Description" />...</table>\[/code\]A part of the html-output table:\[code\]?<table border=1><tr><th>ID</th><th>Lang1Name</th><th>Lang1Description</th><th>other Headings</th></tr><tr><td>1</td><td>name in Language 1</td><td>description in Language 1</td><td>more columns</td></tr><tr><td>2</td><td>another name in Language 1</td><td>another description in Language 1</td><td>more columns</td></tr></table>?????????????????????????????????????????????????????????????????????????????????????????????????????????????\[/code\]UPDATE:my simplified xml-structure:\[code\]<products><product nr="1"><part nr="1" name="Part 1"><header<!-- more elements --> </header><table><!-- crucial part --></table><footer><!--more elements --> </footer></part></product></products>\[/code\]The way I output the xml with only one language inside the table element:\[code\]<xsl:template match ="products"><xsl:for-each select="product"><xsl:variable name="productNo" select="@nr"/> <xsl:for-each select="part"> <xsl:result-document href="http://stackoverflow.com/questions/11054244/p{$productNo}s{@nr}.html" > <html> ....\[/code\]Would this structure let me accomplish my task?Any ideas would be appreciated.Thank you!
 
Back
Top