Re: Resetting metadata after new from template ?

2016-02-06 Thread Pierre
On Thursday, February 04, 2016 01:55:19 PM Friedrich W. H. Kossebau wrote:
> Hi Pierre,
> 
> Am Dienstag, 2. Februar 2016, 22:21:59 schrieb Pierre:
> > On Tuesday, February 02, 2016 02:08:53 PM Jaroslaw Staniek wrote:
> > > On 1 February 2016 at 23:20, Pierre  wrote:
> > > > Hi
> > > > 
> > > > Right now, when we create a new empty document (at least for words),
> > > > like
> > > > any
> > > > other office suite, it is created from a template. But we currently 
lack
> > > > the
> > > > reset of some metadata from our templates, leading to funny 
situations…
> > 
> > For
> > 
> > > > instance, any document created by calligra using the A4 template is 
more
> > > > than
> > > > 7 years old :)
> > > > 
> > > > We have several possible fix :
> > > > - strip metadata from templates : we would still copy the metadata for
> > 
> > user
> > 
> > > > templates, including creation date, bad imho
> > > > - strip all metadata when creating a file from template : bad too, 
users
> > > > could
> > > > have specific metadata they don't want to lose
> > > > - override specific metadata like the creation date with sane values
> > > > 
> > > > Each one is very simple to implement, I just don't know which one is 
the
> > > > best.
> > > > I would go for the third option, but I don't have a list of metadata 
to
> > > > erase.
> > > > (we already override the generator BTW, but elsewhere in the saving
> > > > code)
> > > > 
> > > > Any thoughts on this ?
> > > 
> > > ​Very interesting finding​
> > > ​, Pierre.​
> > > If you ask me, the 3rd option looks best. Documenting the new behaviour,
> > > whatever it is, in the API docs, would be useful.
> > 
> > I just went through the ODF 1.2 spec part regarding metadata, I think we
> > should reset all the meta data defined in the spec except
> > "meta:user-defined"… And remember to fill in the meta:template with the
> > XLink to the source template.
> > If nobody disagrees nor sees anything hazardous in it, I'll implement 
that.

Hi 

> Happy to see you pick this up, I have found this annoying/funny as well :)
> 
> And I agree with & support your implementation plan basically, just a few
> modifications I would like to propose, read on.
> 
> IMHO the ODF spec has a flaw here WRT metadata and templates.
Not only for metadata, there is almost no template specification, but that is 
understandable if we consider ODF to be a document representation 
specification and not an office suite specification.

> There should be separate metadata for the actual template, and separate
> metadata for the to-be-generated document. The first can be used as usual,
> to know more about the template itself when managing templates, and the
> second can be used to preset metadata of the actual generated document, as
> it fits (e.g. keywords, language, or whatever user-defined keys are standard
> with the organisation using the documents). (someone should bring this up in
> the OASIS TC, what, me?)
> 
> But we have to deal now with what there is in the current spec. So I would
> agree that resetting/dumping most metadata on document creation makes sense.
> 
> For the pre-defined metadata (as in ODF 1.2, §4.3.2) I think the following
> metadata could be kept though, as they are about the document/content type
> and less about the template, or only really make sense with the actual
> document.
> So if they are present and set, they could be considered to target the
> created document, right?
> * 
> * 
> * 
> 
> For  and  it is hard to tell, given their
> less specific semantics. They could contain data only useful for template
> management or could be preset metadata for the generated document.
> Having to choose between the chance to leak template handling data into
> generated documents and the inability to preset metadata for documents, the
> second seems a greater issue for me (given I have no template tags like
> "form letter to shutdown stupid customers" ;) ).
> 
> So I agree, let's keep , but then also .
>
> And then there is RDF metadata (§4.2.2), which for the non-content-specific
> statements has the same problem as  and .
> So better kept as is.
> 
> Custom metadata (§4.3.1) would also be treated like  and
>  for the same reasons, keeping as is.
> 
> So in summary, IMHO we should reset/drop these predefined metadata types:
>   - reset to empty
> - reset to empty
> - reset to empty
>   - reset to current author profile
> - reset to current author profile
> - reset to "now"
>- reset to "now"
>- reset to 1
>  - reset to 0
>  - reset to template iri
> 
>  - dump
>  - dump
> 
>- generated on the fly when saving only
>  - generated on the fly when saving only
> 
> Does this small adaption to your plan make sense to you as well? :)

Well, we almost agree, just one thing : editing-cycles should be imho 0 since 
it's incremented while saving. If you creater the file, you expect that 
counter to 

Re: Resetting metadata after new from template ?

2016-02-04 Thread Friedrich W. H. Kossebau
Hi Pierre,

Am Dienstag, 2. Februar 2016, 22:21:59 schrieb Pierre:
> On Tuesday, February 02, 2016 02:08:53 PM Jaroslaw Staniek wrote:
> > On 1 February 2016 at 23:20, Pierre  wrote:
> > > Hi
> > > 
> > > Right now, when we create a new empty document (at least for words),
> > > like
> > > any
> > > other office suite, it is created from a template. But we currently lack
> > > the
> > > reset of some metadata from our templates, leading to funny situations…
> 
> For
> 
> > > instance, any document created by calligra using the A4 template is more
> > > than
> > > 7 years old :)
> > > 
> > > We have several possible fix :
> > > - strip metadata from templates : we would still copy the metadata for
> 
> user
> 
> > > templates, including creation date, bad imho
> > > - strip all metadata when creating a file from template : bad too, users
> > > could
> > > have specific metadata they don't want to lose
> > > - override specific metadata like the creation date with sane values
> > > 
> > > Each one is very simple to implement, I just don't know which one is the
> > > best.
> > > I would go for the third option, but I don't have a list of metadata to
> > > erase.
> > > (we already override the generator BTW, but elsewhere in the saving
> > > code)
> > > 
> > > Any thoughts on this ?
> > 
> > ​Very interesting finding​
> > ​, Pierre.​
> > If you ask me, the 3rd option looks best. Documenting the new behaviour,
> > whatever it is, in the API docs, would be useful.
> 
> I just went through the ODF 1.2 spec part regarding metadata, I think we
> should reset all the meta data defined in the spec except
> "meta:user-defined"… And remember to fill in the meta:template with the
> XLink to the source template.
> If nobody disagrees nor sees anything hazardous in it, I'll implement that.

Happy to see you pick this up, I have found this annoying/funny as well :)

And I agree with & support your implementation plan basically, just a few 
modifications I would like to propose, read on.

IMHO the ODF spec has a flaw here WRT metadata and templates. There should be 
separate metadata for the actual template, and separate metadata for the to-
be-generated document. The first can be used as usual, to know more about the 
template itself when managing templates, and the second can be used to preset 
metadata of the actual generated document, as it fits (e.g. keywords, 
language, or whatever user-defined keys are standard with the organisation 
using the documents). (someone should bring this up in the OASIS TC, what, 
me?)

But we have to deal now with what there is in the current spec. So I would 
agree that resetting/dumping most metadata on document creation makes sense.

For the pre-defined metadata (as in ODF 1.2, §4.3.2) I think the following 
metadata could be kept though, as they are about the document/content type and 
less about the template, or only really make sense with the actual document.
So if they are present and set, they could be considered to target the created 
document, right?
* 
* 
* 

For  and  it is hard to tell, given their 
less specific semantics. They could contain data only useful for template 
management or could be preset metadata for the generated document.
Having to choose between the chance to leak template handling data into 
generated documents and the inability to preset metadata for documents, the 
second seems a greater issue for me (given I have no template tags like "form 
letter to shutdown stupid customers" ;) ).

So I agree, let's keep , but then also .

And then there is RDF metadata (§4.2.2), which for the non-content-specific 
statements has the same problem as  and . So 
better kept as is.

Custom metadata (§4.3.1) would also be treated like  and 
 for the same reasons, keeping as is.

So in summary, IMHO we should reset/drop these predefined metadata types:
  - reset to empty
- reset to empty
- reset to empty
  - reset to current author profile
- reset to current author profile
- reset to "now"
   - reset to "now"
   - reset to 1
 - reset to 0
 - reset to template iri

 - dump
 - dump

   - generated on the fly when saving only
 - generated on the fly when saving only

Does this small adaption to your plan make sense to you as well? :)

Cheers
Friedrich
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


Re: Resetting metadata after new from template ?

2016-02-02 Thread Jaroslaw Staniek
On 1 February 2016 at 23:20, Pierre  wrote:

> Hi
>
> Right now, when we create a new empty document (at least for words), like
> any
> other office suite, it is created from a template. But we currently lack
> the
> reset of some metadata from our templates, leading to funny situations… For
> instance, any document created by calligra using the A4 template is more
> than
> 7 years old :)
>
> We have several possible fix :
> - strip metadata from templates : we would still copy the metadata for user
> templates, including creation date, bad imho
> - strip all metadata when creating a file from template : bad too, users
> could
> have specific metadata they don't want to lose
> - override specific metadata like the creation date with sane values
>
> Each one is very simple to implement, I just don't know which one is the
> best.
> I would go for the third option, but I don't have a list of metadata to
> erase.
> (we already override the generator BTW, but elsewhere in the saving code)
>
> Any thoughts on this ?
>

​Very interesting finding​
​, Pierre.​
If you ask me, the 3rd option looks best. Documenting the new behaviour,
whatever it is, in the API docs, would be useful.


> Thanks
>
>  Pierre
> ___
> calligra-devel mailing list
> calligra-devel@kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
>
>


-- 
regards, Jaroslaw Staniek

KDE:
: A world-wide network of software engineers, artists, writers, translators
: and facilitators committed to Free Software development - http://kde.org
Calligra Suite:
: A graphic art and office suite - http://calligra.org
Kexi:
: A visual database apps builder - http://calligra.org/kexi
Qt Certified Specialist:
: http://www.linkedin.com/in/jstaniek
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


Resetting metadata after new from template ?

2016-02-01 Thread Pierre
Hi

Right now, when we create a new empty document (at least for words), like any 
other office suite, it is created from a template. But we currently lack the 
reset of some metadata from our templates, leading to funny situations… For 
instance, any document created by calligra using the A4 template is more than 
7 years old :)

We have several possible fix :
- strip metadata from templates : we would still copy the metadata for user 
templates, including creation date, bad imho
- strip all metadata when creating a file from template : bad too, users could 
have specific metadata they don't want to lose
- override specific metadata like the creation date with sane values

Each one is very simple to implement, I just don't know which one is the best.
I would go for the third option, but I don't have a list of metadata to erase. 
(we already override the generator BTW, but elsewhere in the saving code)

Any thoughts on this ?

Thanks

 Pierre

signature.asc
Description: This is a digitally signed message part.
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel