OASIS Open Document Format for Office Applications (OpenDocument) TC

 View Only
Expand all | Collapse all

"document template"

  • 1.  "document template"

    Posted 07-12-2011 15:13
    Greetings! Before I create an issue for this I wanted to get some feedback on the issue and its possible resolution. In 19.796.8 <text:template-name> we specify information to be displayed about a document template. But, we never define a document template. Contrast that with the definitions of index templates in Chapter 8 for example. Interoperability would be increased by defining what is meant by "document template," other than as something that can be pointed to and named. (xlink:href attribute on <meta:template> and xlink:title on <meta:template>, respectively) At first I thought we could use template definitions like we do with index entries but those are relatively simple when compared to a document template (or what I imagine a document template to be). Then I thought we could simply say that <meta:template> element attributes have to point at conformant ODF documents as templates. But if we do that, then what happens to the ODF document we are "in," that is where the pointing happens? Do we insert the document template document at a point of insertion? Does it start at the top of the file? Is the result some merging of the styles, etc. of the first document and the document template? If so, by what rules? Part of the problem is that there isn't (to me anyway) a meaningful distinction between an ODF document and an ODF document being used as a document template. At one point in time templates were structurally different from documents but not any more. Which of course crosses all the master-styles stuff as well. Questions: 1) Should we simply lose all the document template language and pointers? Reasoning that you can simply start off with an ODF document that has pre-defined contents and styles, what some might have called a "template." Adv. Avoids the merging of styles/formatting issues, which might be difficult to define with any precision. DisAdv. Would eliminate some elements and attributes, possibly causing backwards compatibility issues. 2) If we keep it, how do we fashion rules for inter-mixing present document and "template" rules? Suggestions/comments? Thanks! Hope everyone is having a great day! Patrick -- Patrick Durusau patrick@durusau.net Chair, V1 - US TAG to JTC 1/SC 34 Convener, JTC 1/SC 34/WG 3 (Topic Maps) Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) Another Word For It (blog): http://tm.durusau.net Homepage: http://www.durusau.net Twitter: patrickDurusau


  • 2.  RE: [office] "document template"

    Posted 07-12-2011 17:07
    I think a document template is a kind of document, not something found in a document. Rationale: There are separate MIME types for template documents and the following are considered in the conformance clauses of Part 1, 2.2.1B allows for a document that has a styles.xml and no content.xml (and vice versa). 2.2.3 OpenDocument Text Document shall be a conforming OpenDocument Document that has, among other things, an associated mimetype that is one of "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template" or "application/vnd.oasis.opendocument.text-master". Note that none of these have very many words about them and the difference between a template and a non-template document is not explained at all other than the reference to a template in <office:document-meta>. They all have an <office:text> element in their <office:body> element. It is not clear what happens when there is no <office:body> element (i.e., there is no content.xml file). This lumping continues: there are template mimetypes for spreadsheet documents, drawing documents, presentation documents, chart documents, and image documents. In Appendix C (MIME Types and File Name Extensions) there is also formula document template and a text-web document serving as a template for HTML documents, but neither of these occur in the specification itself. We also need to deal with the fact that application/vnd.oasis.opendocument.database (not .base) has been registered for some time. We should either fix the document or do another MIME type registration for .base.


  • 3.  Re: [office] "document template"

    Posted 07-14-2011 13:02
    Dennis, Agreed, but that still leaves the non-template ODF document in the air. And what happens if a template has content and is selected after content has been added to a non-template ODF document. Hope you are having a great day! Patrick On 07/12/2011 01:07 PM, Dennis E. Hamilton wrote: > I think a document template is a kind of document, not something found in a document. > > Rationale: > > There are separate MIME types for template documents and the following are considered in the conformance clauses of Part 1, > > 2.2.1B allows for a document that has a styles.xml and no content.xml (and vice versa). > > 2.2.3 OpenDocument Text Document shall be a conforming OpenDocument Document that has, among other things, an associated mimetype that is one of "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template" or "application/vnd.oasis.opendocument.text-master". > > Note that none of these have very many words about them and the difference between a template and a non-template document is not explained at all other than the reference to a template in<office:document-meta>. They all have an<office:text> element in their<office:body> element. > > It is not clear what happens when there is no<office:body> element (i.e., there is no content.xml file). > > This lumping continues: there are template mimetypes for spreadsheet documents, drawing documents, presentation documents, chart documents, and image documents. > > In Appendix C (MIME Types and File Name Extensions) there is also formula document template and a text-web document serving as a template for HTML documents, but neither of these occur in the specification itself. > > We also need to deal with the fact that application/vnd.oasis.opendocument.database (not .base) has been registered for some time. We should either fix the document or do another MIME type registration for .base. > > > > > >


  • 4.  RE: [office] "document template"

    Posted 07-14-2011 19:45
    A case that interests me is what happens if the template is changed after a document that depended on it is produced? What if a template of the same name exists at the consumer who opens a document that was produced from a template of the same name (the famous normal.dot comes to mind)? None of these behaviors or anything else is addressed in the specification, and I'm not sure that it can be. What I'm fairly confident of is, if you open a template it will often populate an initial anonymous document that may or may not be considered touched. That is, if it is closed the new document either vanishes or treatment is the same as attempting to close an unsaved document that has no name yet. It is difficult to assume even that much, but we can on the OIC as a typical case to give advice for (perhaps), if not on the ODF TC. - Dennis


  • 5.  Re: [office] "document template"

    Posted 07-14-2011 20:10
    Hi Dennis On Thu, Jul 14, 2011 at 4:45 PM, Dennis E. Hamilton <dennis.hamilton@acm.org> wrote: > A case that interests me is what happens if the template is changed after a document that depended on it is produced?  What if a template of the same name exists at the consumer who opens a document that was produced from a template of the same name (the famous normal.dot comes to mind)? As far as I remember, a template is only used to format the document during it's initial creation, and to provide for users a special set of pre-defined styles that they can use on the document. I never heard (or saw) an office document use case as you present here. The way you're explaining here looks like the .css usage on HTML files, but I don't think that we have something similar to that in the real world of office documents. > None of these behaviors or anything else is addressed in the specification, and I'm not sure that it can be. I have serious doubts if this is something that we may address in the specification: 1. Do we need really to explain to people how-to use templates ? 2. If we do so, how big is the risk of halting innovation on this area ? Best, Jomar


  • 6.  Re: [office] "document template"

    Posted 07-14-2011 20:44
    Jomar, On 7/14/2011 4:09 PM, Jomar Silva wrote: > Hi Dennis > > On Thu, Jul 14, 2011 at 4:45 PM, Dennis E. Hamilton > <dennis.hamilton@acm.org> wrote: >> A case that interests me is what happens if the template is changed after a document that depended on it is produced? What if a template of the same name exists at the consumer who opens a document that was produced from a template of the same name (the famous normal.dot comes to mind)? > As far as I remember, a template is only used to format the document > during it's initial creation, and to provide for users a special set > of pre-defined styles that they can use on the document. I never heard > (or saw) an office document use case as you present here. > The problem is that we define "pointing" at a template from inside an ODF document. Question: What is the "thing" being pointed at? Is it an ODF document? If so, we have an ODF document pointing at an ODF document. Recalling that we define the contents of templates, which seems to me to point towards a template being an ODF document. I don't think there is an answer in the current text, hence the reason I started this line of questions before formulating a proposal. > The way you're explaining here looks like the .css usage on HTML > files, but I don't think that we have something similar to that in the > real world of office documents. > >> None of these behaviors or anything else is addressed in the specification, and I'm not sure that it can be. > I have serious doubts if this is something that we may address in the > specification: > > 1. Do we need really to explain to people how-to use templates ? > > 2. If we do so, how big is the risk of halting innovation on this area ? > Well, if we aren't going to define templates and at least how they are invoked by ODF documents, why mention them at all? You can have all the "innovation" you want by simply saying nothing. That does create interoperability problems. Just off the top of my head, I was thinking of proposing that that a template be defined as styles, content, forms, etc., prior to the entry of user created content. Once a document has user created content, unless saved as a template, it is simply an ODF document, etc. OK, would have to define ODF document to exclude templates. From my perspective, templates involved assumptions about application behavior that are not defined in the standard. What I want to do is put everyone on an explicit and even footing with regard to those assumptions. That involves making them explicit. We could abandon templates entirely to the realm of application behavior, although I think that would be a bad solution. But it would be an explicit solution. Hope you are having a great day! Patrick > Best, > > Jomar > > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. Follow this link to all your TCs in OASIS at: > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php > -- Patrick Durusau patrick@durusau.net Chair, V1 - US TAG to JTC 1/SC 34 Convener, JTC 1/SC 34/WG 3 (Topic Maps) Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) Another Word For It (blog): http://tm.durusau.net Homepage: http://www.durusau.net Twitter: patrickDurusau


  • 7.  Re: [office] "document template"

    Posted 07-14-2011 21:45
    On Thu, Jul 14, 2011 at 5:41 PM, Patrick Durusau <patrick@durusau.net> wrote: > Jomar, > > On 7/14/2011 4:09 PM, Jomar Silva wrote: >> >> Hi Dennis >> >> On Thu, Jul 14, 2011 at 4:45 PM, Dennis E. Hamilton >> <dennis.hamilton@acm.org>  wrote: >>> >>> A case that interests me is what happens if the template is changed after >>> a document that depended on it is produced?  What if a template of the same >>> name exists at the consumer who opens a document that was produced from a >>> template of the same name (the famous normal.dot comes to mind)? >> >> As far as I remember, a template is only used to format the document >> during it's initial creation, and to provide for users a special set >> of pre-defined styles that they can use on the document. I never heard >> (or saw) an office document use case as you present here. >> > The problem is that we define "pointing" at a template from inside an ODF > document. > > Question: What is the "thing" being pointed at? > > Is it an ODF document? > > If so, we have an ODF document pointing at an ODF document. > > Recalling that we define the contents of templates, which seems to me to > point towards a template being an ODF document. > > I don't think there is an answer in the current text, hence the reason I > started this line of questions before formulating a proposal. OK... I understand the issue now, but I don't see how Dennis use case affects that (shame on me). >> The way you're explaining here looks like the .css usage on HTML >> files, but I don't think that we have something similar to that in the >> real world of office documents. >> >>> None of these behaviors or anything else is addressed in the >>> specification, and I'm not sure that it can be. >> >> I have serious doubts if this is something that we may address in the >> specification: >> >> 1. Do we need really to explain to people how-to use templates ? >> >> 2. If we do so, how big is the risk of halting innovation on this area ? >> > > Well, if we aren't going to define templates and at least how they are > invoked by ODF documents, why mention them at all? > > You can have all the "innovation" you want by simply saying nothing. > > That does create interoperability problems. > > Just off the top of my head, I was thinking of proposing that that a > template be defined as styles, content, forms, etc., prior to the entry of > user created content. Once a document has user created content, unless saved > as a template, it is simply an ODF document, etc. OK, would have to define > ODF document to exclude templates. +1 on that... BTW this is how I understand document templates, and this is something that we should define on the standard seeing that this understanding may not be the same everywhere. This raised another question: Does anyone there knows if (and how) applications uses the template-related elements ? (I did some quick tests with OpenOffice saving document templates and I didn't saw any template element used there). > From my perspective, templates involved assumptions about application > behavior that are not defined in the standard. What I want to do is put > everyone on an explicit and even footing with regard to those assumptions. > That involves making them explicit. > > We could abandon templates entirely to the realm of application behavior, > although I think that would be a bad solution. But it would be an explicit > solution. > > Hope you are having a great day! > > Patrick Best, Jomar


  • 8.  RE: [office] "document template"

    Posted 07-14-2011 23:02
    There are indeed office-productivity document systems where changes in a template can be applied to an existing document. And some suites will allow changes in a document to be reflected back in a template. Of course, templates can be complete documents with lots of text in them, such as the templates for ODF specifications. Most of my templates have text in them, instructions for authors, all manner of content. I don't know how clever the update-from-template is in that case. There is no such functionality in any native ODF consumer that I am aware of, apart from what the Template Organizer allows in OpenOffice.org. I agree that the simple case is that the template document's peculiar function is that when a document is created with it, that document is a new document and not an editing of the template itself (unless it is opened as a template rather than used to start a new document). There are a variety of ways that works. Double-clicking on the template does it for Microsoft Office, OpenOffice.org, and LibreOffice. A new document is populated with the template but it is an unnamed document. If I touch it (add text, etc.), then it becomes an unsaved new document and I'll be asked if I want to save it if I attempt to close it. If I want to save it, I have to name it, perhaps choose a location, etc. So the question remains, what is special about having a defined meta.xml element that names the template, if any, a document was created with? A bigger question is, what is so special about an OpenDocument Text document that has the Text Template Document MIME type, an OpenDocument Spreadsheet document that has the Spreadsheet Template Document MIME type, etc. How can we have any interoperable interchange of templates if we lack any interoperable definition of what a template is good for?


  • 9.  Re: [office] "document template"

    Posted 07-15-2011 16:18
    Hi Dennis, On Thu, Jul 14, 2011 at 8:02 PM, Dennis E. Hamilton <dennis.hamilton@acm.org> wrote: > There are indeed office-productivity document systems where changes in a template can be applied to an existing document.  And some suites will allow changes in a document to be reflected back in a template. > > Of course, templates can be complete documents with lots of text in them, such as the templates for ODF specifications.  Most of my templates have text in them, instructions for authors, all manner of content.  I don't know how clever the update-from-template is in that case. There is no such functionality in any native ODF consumer that I am aware of, apart from what the Template Organizer allows in OpenOffice.org. > > I agree that the simple case is that the template document's peculiar function is that when a document is created with it, that document is a new document and not an editing of the template itself (unless it is opened as a template rather than used to start a new document).  There are a variety of ways that works.   Double-clicking on the template does it for Microsoft Office, OpenOffice.org, and LibreOffice.  A new document is populated with the template but it is an unnamed document.  If I touch it (add text, etc.), then it becomes an unsaved new document and I'll be asked if I want to save it if I attempt to close it.  If I want to save it, I have to name it, perhaps choose a location, etc. > > So the question remains, what is special about having a defined meta.xml element that names the template, if any, a document was created with? I see a use case for that inside corporate environments. Usually a company may have several templates to do pre-formated reports and documents, but sometimes it is hard to know if users are really using them. I've also seen some cases where a template was updated and the user choose to use an old version of the template and did 'his own' changes to match the new template (usually they do that using an old document to start a new one instead of using a template). Using LibreOffice, if you look at the first tab on Document Properties (on a document created based on a template) you'll see the template name there (and the meta:template element used in meta.xml). > A bigger question is, what is so special about an OpenDocument Text document that has the Text Template Document MIME type, an OpenDocument Spreadsheet document that has the Spreadsheet Template Document MIME type, etc.  How can we have any interoperable interchange of templates if we lack any interoperable definition of what a template is good for? I thought that template definition was commonly understand by everyone, but if you have doubts about that, so I agree that we should write this definition on the standard. I'm playing with LibreOffice templates since yesterday and I didn't found any use to <text:template>, so I would like to ask the 'old guys' from the TC if they remind why this was inserted into the ODF standard and what is the use case for that. For what I've seen so far, the <meta:template> with a definition of what a template is is sufficient to solve the present issue. We need to further investigate the <text:template> use cases (I didn't found anyone... shame on me, again !). Best, Jomar


  • 10.  RE: [office] "document template"

    Posted 07-15-2011 16:54
    <text:template-name> is a field. I assume it provides the content of any <meta:template> element is present. So you could say, in the document, what template it was produced with. It would be fun to have a test document for that. - Dennis


  • 11.  RE: [office] "document template"

    Posted 07-14-2011 22:16
    Since this came up, there is also the question about what is the appropriate URI to use to locate a template. Some producers use just a file name. Others use an absolute location on the local file system, so it is difficult for a collaborator or anyone elsewhere to access it. I have seen documents where there was a master document, chapter documents, and a template all bundled together in a Zip archive for interchange. Without getting into the master document case, it appears completely legal, to me, to have a template document as a subdocument in an ODF package and it could travel with the document based on it. But having that be useful seems like a bigger issue. - Dennis