Subject: RE: [xsl] Word -> XSL From: Emmanuel Bégué <eb@xxxxxxxxxx> Date: Tue, 5 Jan 2010 09:31:16 +0100 |
Hello, This is what I understand about what you want to do: - you receive "templates" from restaurants that designed them themselves using either MS-Word or MS-Excel (one restaurant sends one template that's specific to its needs and that will ever only be used by this one restaurant) - you want to transform the received files into actual templates (meaning a general layout and variables), either by using directly Office "Open" XML formats ("Option 1") or transforming the templates into FO files ("Option 2") - once this is done you'll be able to generate "on the fly" wine lists using a database of wines and the specific template of each restaurant. You would also like to do this using XML / XSLT. If the above is correct: - I would not attempt Option 2 in any case; making an FO template from a Word file that may include pics, specific and maybe non-standard layout made from amateur designers (ie, restaurant owners) is going to be very hard if not impossible; it may be justified if there were some economies of scale to be made (one template for many restaurants), but not here (unless there is some kind of automatic Word-to-FO tool that I'm unaware of?) - Option 1 does not sound great either: XSLT is not a search and replace utility (it transforms one tree into another tree), and an Office XML file is composed of many files in a zip package, that are not very easy to manipulate - What I would try would be to use RTF; RTF files are simple text files that can be manipulated with any ordinary search and replace utility: - save the templates received from restaurants into RTF files, with specific variable names where needed (Excel layouts can be first transformed to Word tables before being saved to RTF) - when generating a new wine list, search and replace variable names with new values Another approach many be to provide restaurants with a general (and rather strict) layout that they may customize (responsibly); if it is possible to impose this, Option 2 may make sense, because you'd have to develop the FO just once; but if you need to give maximum freedom to restaurants, I suggest you try the RTF solution. Hope this helps. Regards, EB > -----Original Message----- > From: Schultz, Len [mailto:len@xxxxxxxxxxxxx] > Sent: Monday, January 04, 2010 7:30 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Word -> XSL > > > Hello, > > I am building a web application that will allow restaurants to > easily create custom beverage (e.g. wine) menus utilizing a > central database of beverage products. Key to this is making it > really easy to have each restaurant specify and implement their > look and feel into their menus. The effort needs to be extremely > light weight: we'll have to do potentially 1000 different menu > templates for 1000 different restaurants. FYI, today 90% of > menus are done in MS Word, another 9% done in MS Excel, and the > remaining 1% is probably Adobe InDesign, Quark, and MS Publisher. > > I want to implement this using XML and XSLT. The question I have > for this group is the plusses and minuses of 2 different targets > for the transformation. > > Option 1 is to transform to WordML and SpreadsheetML. This has > the benefits of 1) having the restaurant send us their design in > Word/Excel, then all we have to do is create an XSLT to replace > the data. And 2) if there are changes or adjustments to make in > the layout, the restaurant can then make those changes in > Word/Excel, and we just create a new XLST. > > Option 2 is to transform to XSL (aka XSL-FO). This has the > benefits that 1) we can transform to PDF, which would cover the > 1% that don't have Word/Excel. And 2) we can keep people in our > system to make. But I don't know how we can easily create the > XSL from sample menus sent to us in Word. I also don't know what > kind of layout change process would work (our web application > might need to be robust enough to allow users to fine-tune layout > changes online) > > I'd like to tackle the first issue first. Does anyone have > insights into how XSL could be created from a sample Word > document, and the effort involved in creating that XSL? > > --len
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Word -> XSL, Schultz, Len | Thread | RE: [xsl] Word -> XSL, Michael Kay |
RE: [xsl] Using XPath to refer to a, Robby Pelssers | Date | RE: [xsl] Using XPath to refer to a, Michael Kay |
Month |