El mar, 30-05-2006 a las 15:41 +0200, Andreas Hartmann escribió:
> Andreas Hartmann wrote:
> > Hi Lenya devs,
> >
> > the opendocument module (CreateOpenDocument) contains code which
> > depends on the configuration of the publication's content directory:
>
> Until now, there's no comment on this thread. Does that mean
> that the code has no special meaning?
Thanks for bringing this up again. I was away and till now not read all
mails. Sorry.
>
> Thorsten, "svn praise" mentions you as the author :)
jeje ;)
> Can you remember why the condition was introduced?
> Maybe it was a workaround for the source extension problem?
Yes, it was an extension and external content dir workaround. The
problem was when writing the code that I needed to know where to create
the odt document.
The document.getSourceURI() back then did never gave an external content
dir nor the right extension.
> Thanks for any comments!
I have not fully reviewed the recent changes but if you can give me some
hints we can fix the code.
Thanks Andreas for pursuing this issue.
salu2
>
> -- Andreas
>
>
> > contentDir = pub.getContentDir();
> > String urlID = "content/" + document.getArea() + document.getId()
> > + "/" + DEFAULT_INDEX + "_" + document.getLanguage();
> >
> > if (contentDir == null) {
> > destination = SourceNode.CONTEXT_PREFIX
> > + Publication.PUBLICATION_PREFIX_URI + "/"
> > + publicationId + "/" + urlID;
> > } else {
> > if (new File(contentDir).isAbsolute()) {
> > // Absolute
> > destination = SourceNode.FILE_PREFIX + contentDir
> > + File.separator + urlID;
> > } else {
> > // Relative
> > destination = SourceNode.CONTEXT_PREFIX + contentDir
> > + File.separator + urlID;
> > }
> > }
> >
> >
> > This violates SoC (the create usecase shouldn't have to care about
> > the publication configuration).
> >
> > Is there a special reason why document.getSourceURI() is not sufficient
> > to write the content?
> >
> > -- Andreas
> >
> >
> >
>
>
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]