[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [ubl-hisc] Taking apart the spreadsheets
At 2005-07-15 00:04 -0700, Micah Dubinko wrote: >A really rough first cut at an XSLT 2.0 spreadsheet that takes apart the >1.0 source spreadsheet to generate info that's needed from the script that >generates the input specifications. Kewl! >Stylesheet attached. (the way OpenOffice can group adjacent blank cells >requires some care!) :{)} >Here's what the typical output looks like, given input of the >OrderResponseSimple spreadsheet. I still have to figure out some kind of >big merge operation, either cut-n-paste to make one uber-spreadsheet out >of the 12, or else post-processing this kind of XML. I think post-processing the XML will be *much* easier, and without human intervention, than cut-n-paste. But there is a third option to consider, and that is instead of merging the XML output by this stylesheet, merging the table:table constructs of the exported spreadsheets to make an über-table:table of all rows of all stylesheets and *then* creating the output from there. I think we need to also have the option of combining only a single document type's spreadsheet table:table with all of the common table:table constructs in order to process all of the constructs for a given document type, as opposed to always running on all of the constructs for all document types. May I suggest your row loop looking at each of the cells base the emitting of the output elements on the name of the table column in row 1, rather than based on cell number? That way when those in charge of the spreadsheets inject ore remove columns (which even HISC is asking them to do) your stylesheet will continue to work unchanged. Something along the lines of: <xsl:when test="normalize-space(../../table:row[1]/table:cell[$pos]) = 'Property Term'"><label><xsl:value-of select="text:p"/></label></xsl:when> And, not only is this protected against the insertion/deletion of columns, it documents to the stylesheet reader which columns are being used for the output. I think your resulting stylesheet, the merging stylesheet, and this methodology discussed during our teleconferences could be documented in a short white-paper for other UBL subcommittees to use if they wanted to mine the spreadsheets for information they will find useful. Well done, Micah! . . . . . . . . . . Ken -- World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@CraneSoftwrights.com Crane Softwrights Ltd. http://www.CraneSoftwrights.com/o/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/o/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]