You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Michael Wechner <mi...@wyona.com> on 2006/06/06 13:51:36 UTC

Re: Source extensions and resource types

Andreas Hartmann wrote:
> Thorsten Scherler wrote:
>
> [...]
>
>> I tested it on the default pub and another pub that was using an
>> external content dir. It works for both so I committed the changes.
>
> OK, cool!
>
>>
>> http://svn.apache.org/viewvc?rev=410503&view=rev
>>
>> Thanks for the headsup and the slim fast solution. 
>
> No problem :)
>
>>> BTW, we should consider handling the source extension in another
>>> way (configuration?). It's not very convenient to add a class just
>>> for a different source extension.
>>
>> Yeah, you are totally right. Maybe it is time to talk again about the
>> register extension with resource type on a global basis.
>>
>> http://marc.theaimsgroup.com/?t=114258900800004&r=1&w=2
>>
>> wdyt?
>
> I still think that extensions should be orthogonal to resource types.
> The extension belongs to the actual document and should be provided
> when the document is created.
>
> - "image" resources can have different extensions
> - the ".xml" or ".txt" extensions can be used by different resource types
>
> I don't see a relation between extensions and resource types.

agreed, but the resource type implementation should be able to 
initialize a NodeImplementation which
can handle extensions.

Michi

>
> The resource type's concern is how documents are handled.
> The document's concern is how it is named.
>
> -- Andreas
>
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org
+41 44 272 91 61


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Source extensions and resource types

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner schrieb:

[...]

>> I don't see a relation between extensions and resource types.
> 
> agreed, but the resource type implementation should be able to 
> initialize a NodeImplementation which
> can handle extensions.

I guess you mean that it adds extensions to the files in which
documents are stored?

Like I already mentioned, this is not possible with the current
architecture. To allow this, the document must handle meta
data, not the node. This cannot be implemented using a custom
NodeFactory, it requires changes to some classes above the
repository API.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Source extensions and resource types

Posted by so...@apache.org.
On 6/6/06, Michael Wechner <mi...@wyona.com> wrote:
> Andreas Hartmann wrote:
> > I still think that extensions should be orthogonal to resource types.
> > The extension belongs to the actual document and should be provided
> > when the document is created.
> >
> > - "image" resources can have different extensions
> > - the ".xml" or ".txt" extensions can be used by different resource types
> >
> > I don't see a relation between extensions and resource types.
>
> agreed, but the resource type implementation should be able to
> initialize a NodeImplementation which
> can handle extensions.
> >
> > The resource type's concern is how documents are handled.
> > The document's concern is how it is named.

In Lenya1.3, extensions are maintained at the Revision level.

Resource: UNID="0160", Title="websitetitle", type="file"
Translation: language="en", liveRevision="20060602075920"
Revision: UNID="20060602075920", extension="gif"

"websitetitle.gif" would display the correct file.

The expectation is the link (in documents and XSL) will be stored as
something like <LINK UNID="0160" TAG="img"/> so Lenya can replace it
with the appropriate anchor or img tag for display.  That allows the
graphic Resource to be changed to "websitetitle.png" or
"websitetitle.jpg" without changing any documents or XSL.

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org