Thank you, Emmanuel and Michael.
You paraphrased the requirements perfectly, except for Option 1. I am not
targeting the Open Office format (e.g. Word 2007). I am targeting WordML (the
save as "Word 2003 XML" option): this is a single text file like RTF, but much
easier to read and manipulate than RTF.
I reached the same conclusion about using FO: it would be so much work that it
would not be worth it, unless there was a tool that could translate. I wanted
to double check with the experts first.
Michael, you are right that almost no "amateur" users use the high level
structuring features: e.g. all spacing and pagination is done with carriage
returns. This will be one of the steps needed before the transform is to apply
consistent styles and structure to the template before transformation.
And you both bring up a good point on the other approach: that a simplified
design kit with limited customization options might work better for most
restaurants. Most restaurants might get a better product that way: a
professionally designed and structured layout with consistency.
This brings up another question I have. I don't know FO well, and don't know
what it can and can't do relative to WordML. E.g. in WordML, I can specify a
book fold: where the flow is presented on a 2 column landscape layout that can
be folded in the middle to create a book. I can set this up with one parameter
in WordML. What are FO's limitations relative to a powerful word processor or
page layout program?
Also, does anyone have experience with commercial servers, such as Quark
Server, In Design Server, PageFlex, etc? If so, what do these bring to the
table that FO and WordML can't do?
--len
-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
Sent: Tuesday, January 05, 2010 1:34 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Word -> XSL
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.
I came to the same conclusion about the requirements, though I wasn't at all
sure I'd got it right.
I think that unless you severely constrain the way in which Word or Excel
are used, this is going to be very difficult - it reduces to an exercise in
pattern recognition. There are so many ways of achieving the same output in
Word, and most "amateur" users fail to make proper use of high-level
structuring facilities such as styles, tables, nested headings, and the
like.
A better approach might be to issue restaurants with a simple design kit
like the one sometimes used for web site starter kits. Give them a basic
menu design, and let them change things like fonts, page sizes, column
layouts, images etc in a controlled way (through a GUI where they can
instantly see the effect of their changes). Supply the actual data (dishes
and prices) in a spreadsheet form of your own design, which they can also
modify to represent their own dishes.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
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(_at_)winequest(_dot_)com]
Sent: Monday, January 04, 2010 7:30 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--