I need to convert a excel spreadsheet saved in xml format using a stylesheet...but I keep getting hung up on the many namespaces ms uses. I need an XSLT stylesheet that allows per element passing (the default seems to pass ALL the text when I use a stylesheet that should otherwise only pass the element templates I am writing) of the input xml.
Here's the input xml:
http://apriority.dyndns.biz/im_cache/u_1/j_2390/2_9/tf/testexcel.xml
:I need to simply extract data from both sheets in columns, like:
Output:
Sheet 1 1) blah, blue , burn, baste, belly, belie, bestow, betrothed, bemoan 2) quack, quagmire, quick, quantum, quant 3) alimony, ashy, amber, absolute, astrology, alabaster, angry 4) cost, curry, candor, cabin, capability, castor, canada Sheet 2 1) 3 2) 32 3) 322 ....etc. I have trouble with the stylesheet...something to do with the namespaces that MS uses in the input xml ...I seem to be getting in my output ALL of the data even if i only have one element template (say for extracting the rows of only the first sheet)...what stylesheet code will get the output above???
Here is the stylesheet I have so far:
http://apriority.dyndns.biz/im_cache/u_1/j_2390/2_9/tf/learningmap.xsl
File put on non https url so no virus risk plus I am using my real name, google me!
Here is the edited stylesheet after use of suggested code by Mads!
http://apriority.dyndns.biz/im_cache/u_1/j_2390/2_9/tf/learningmap_mod.xsl
I still have a problem where the actual text data is not being extracted in that follow up code, why am I not able to get the text data. I can output the first variable "snid" but all the text variables don't appear in the output even though I am selecting them and the original source xml has stuff in those entries. Any help on this new problem would be greatly appreciated!
Update Feb. 9:
I solved the issue with the mapping failure to the variables. It was a simple xpath mistake I was addressing nodes that didn't exist. There is a one to one mapping between the Cells and their rows so the variables should have extracted as Cell[k].Row[1]...Cell[k+1].Row[1]...etc.
The output transformation occurs as I need it to, thanks for the contributions toward the answer. This one is hard to judge which answer is accepted as both submissions were of aid but I'll have to give it to Mads Hanson this time. Thanks!
C L O S Ethis question. It provides a link to a dangerous site, doesn't contain even the most essential information, such as an XML document, the form of the wanted output seems arbitrary general.