You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by David Nuescheler <da...@gmail.com> on 2005/02/14 12:12:35 UTC

jcr-taglib (used to be portlets, etc.)

hi edgar,

> I'm working on a set of tags that reads and displays jcr 
> data. You can plug your custom traverse strategy and 
> template engine, so I guess it fits your needs as long 
> as you use jsp instead of xml/xsl for rendering your 
> portlets.
> http://cablemodem.fibertel.com.ar/edgarpoce/
cool, very interesting. i thought about 
something similar too.
when i looked at your the set of tags i saw
a lot of similarities.

one thing that i thought of, was to introduce 
something like a "current working directory" that
allows simple navigation in nodes.
something like:

<jcr:cd path="/level1/mytest">
  <jcr:out path="../bla/mynode" />
  <jcr:out path="/app:myprop" />
</jcr:cd>

i think this could also provide for more modular
jsp includes... 
what do you think?

i initially thought of hooking-up the template 
engine concept slightly differently. 
overall it seems very interesting and i think it 
could be valuable for the entire jcr community 
to have well-known tag libraries.

regards,
david
----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97

Re: Limit of 65535 bytes per String value?

Posted by David Nuescheler <da...@gmail.com>.
hi timur,

thanks for reporting that. maybe you could put that into
jira, since to me this really looks like a bug.

> I just have been hit by a strange limitation of Jackrabbit
> ObjectPersistenceManager.
> I've got a custom property with String type and multiple="true" (which is
> mapped to String[] Java type)
> The problem is that Jackrabbit writes these Strings internally using
> DataOutputStream.writeUTF method, which throws UTFDataFormatException when
> the number of bytes required to save that string is effectively more than
> 2^16, thus 65535
oops.

> That leaves me to worry, because I thought I could have used these String[]
> fields for multi-page articles and online books on my site. The only option
> I've left to is use of multiple Binary field which could store fields any
> length. However APIs for Binary fields works with InputStream!
> Because of this, my neat and nice
> setProperty("text", new String[] {xxx, yyy, ...});
> would suddenly explode into full-blown method or even class of its own!
should all be working exactly as you expected.
this sounds all very fishy to me, just for my reference which 
jdk version are you using?

> Were there any REAL reasons to limit Strings length by 65535?
> JCR spec, at a first quick sweep through, says nothing about it.
no, there is no limitation like that in jcr. i can't think of reason that 
would justify something like that ;)

> So I've made some quick changes to ObjectPersistenceManager, replacing
> read/writeUTF with byte-wise String persistence, and it works for me.
> Attached comes the copy.
unfortunately your attachment didn't make it (at least not to me),
but a lot of people had issues sending attachments to the list.

regards,
david

----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97

Re: Limit of 65535 bytes per String value?

Posted by Stefan Guggisberg <st...@gmail.com>.
i committed a workaround for this issue. instead of writeUTF i am
using write(byte[]). it's fixed in r154150.

cheers
stefan


On Thu, 17 Feb 2005 11:36:23 +0100, Stefan Guggisberg
<st...@gmail.com> wrote:
> hi timur,
> 
> thanks for reporting this issue.
> 
> On Wed, 16 Feb 2005 21:04:03 +0100, Timur Evdokimov <ti...@jacum.com> wrote:
> >
> > Hello everyone,
> >
> > I just have been hit by a strange limitation of Jackrabbit
> > ObjectPersistenceManager.
> >
> > I've got a custom property with String type and multiple="true" (which is
> > mapped to String[] Java type)
> > The problem is that Jackrabbit writes these Strings internally using
> > DataOutputStream.writeUTF method, which throws UTFDataFormatException when
> > the number of bytes required to save that string is effectively more than
> > 2^16, thus 65535
> >
> > That leaves me to worry, because I thought I could have used these String[]
> > fields for multi-page articles and online books on my site. The only option
> > I've left to is use of multiple Binary field which could store fields any
> > length. However APIs for Binary fields works with InputStream!
> >
> > Because of this, my neat and nice
> >
> > setProperty("text", new String[] {xxx, yyy, ...});
> >
> > would suddenly explode into full-blown method or even class of its own!
> >
> > Were there any REAL reasons to limit Strings length by 65535?
> > JCR spec, at a first quick sweep through, says nothing about it.
> 
> no, it's an implementation issue, as you assumed correctly.
> 
> the culprit is the following line in
> DataOutputStream.writeUTF(String str, DataOutput out) :
> 
>         if (utflen > 65535)
>             throw new UTFDataFormatException();
> 
> i am speechless..., there seemed to be real pro's at work :(
> 
> nevertheless, please post a jira bug and i'll fix it asap.
> 
> you can attach your patch to the jira issue, if you wish.
> 
> thanks
> stefan
> 
> >
> > So I've made some quick changes to ObjectPersistenceManager, replacing
> > read/writeUTF with byte-wise String persistence, and it works for me.
> > Attached comes the copy.
> >
> > Regards,
> > Timur
> >
> >
>

Re: Limit of 65535 bytes per String value?

Posted by Dominique Pfister <do...@day.com>.
David Nuescheler wrote:
>>DataOutputStream.writeUTF(String str, DataOutput out) :
>>       if (utflen > 65535)
>>           throw new UTFDataFormatException();
> 
> 
> LOL ;) that will make for a pretty site 
> in sun's bug parade.
> 
Well, the javadoc for the interface method DataOutput.writeUTF declares 
this limitation that is probably due to the internal limit for constant 
string values inside a Java Virtual Machine:

* [...] If this number is larger than
* <code>65535</code>, then a <code>UTFDataFormatException</code>
* is thrown.

Sadly enough, this warning didn't make it into the javadoc of 
DataOutputStream's implementation...

Dominique

Re: Limit of 65535 bytes per String value?

Posted by David Nuescheler <da...@gmail.com>.
> DataOutputStream.writeUTF(String str, DataOutput out) :
>        if (utflen > 65535)
>            throw new UTFDataFormatException();

LOL ;) that will make for a pretty site 
in sun's bug parade.

regards,
david

Re: Limit of 65535 bytes per String value?

Posted by Stefan Guggisberg <st...@gmail.com>.
hi timur,

thanks for reporting this issue.

On Wed, 16 Feb 2005 21:04:03 +0100, Timur Evdokimov <ti...@jacum.com> wrote:
> 
> Hello everyone,
> 
> I just have been hit by a strange limitation of Jackrabbit
> ObjectPersistenceManager.
> 
> I've got a custom property with String type and multiple="true" (which is
> mapped to String[] Java type)
> The problem is that Jackrabbit writes these Strings internally using
> DataOutputStream.writeUTF method, which throws UTFDataFormatException when
> the number of bytes required to save that string is effectively more than
> 2^16, thus 65535
> 
> That leaves me to worry, because I thought I could have used these String[]
> fields for multi-page articles and online books on my site. The only option
> I've left to is use of multiple Binary field which could store fields any
> length. However APIs for Binary fields works with InputStream!
> 
> Because of this, my neat and nice
> 
> setProperty("text", new String[] {xxx, yyy, ...});
> 
> would suddenly explode into full-blown method or even class of its own!
> 
> Were there any REAL reasons to limit Strings length by 65535?
> JCR spec, at a first quick sweep through, says nothing about it.

no, it's an implementation issue, as you assumed correctly.

the culprit is the following line in 
DataOutputStream.writeUTF(String str, DataOutput out) :

	if (utflen > 65535)
	    throw new UTFDataFormatException();

i am speechless..., there seemed to be real pro's at work :(

nevertheless, please post a jira bug and i'll fix it asap.

you can attach your patch to the jira issue, if you wish.

thanks
stefan

> 
> So I've made some quick changes to ObjectPersistenceManager, replacing
> read/writeUTF with byte-wise String persistence, and it works for me.
> Attached comes the copy.
> 
> Regards,
> Timur
> 
>

Re: jcr-taglib (used to be portlets, etc.)

Posted by Edgar Poce <ed...@gmail.com>.
Hi

David Nuescheler wrote:
> hi edgar,
> 
> 
>>thanks a lot. i will have a look at it soon ;)
> 
> i just would like to apologize for the delay and 
> unfortunately i still didn't have enough time to 
> carefully look at it. sorry.
> as far as i can see there are already other users
> of the taglib? comments?
It seems there are, I received a couple of mails with questions about 
compiling problems because there's an error in the project.xml.

I didn't use it extensively yet because I'm working on persistence 
issues, chaining persistence strategies is my main concern these days. 
But in the following weeks I have plans to put all the pieces together 
and if I update the taglib I'll let you know.

> 
> regards,
> david
> 

regards
edgar

Re: jcr-taglib (used to be portlets, etc.)

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi edgar,

just wanted to say that your taglib is also on my todo list, but 
unfortunately other items have a higher priority right now.

cheers
  marcel

David Nuescheler wrote:
> hi edgar,
> 
> 
>>thanks a lot. i will have a look at it soon ;)
> 
> i just would like to apologize for the delay and 
> unfortunately i still didn't have enough time to 
> carefully look at it. sorry.
> as far as i can see there are already other users
> of the taglib? comments?
> 
> regards,
> david
> 
> 

Re: jcr-taglib (used to be portlets, etc.)

Posted by David Nuescheler <da...@gmail.com>.
hi edgar,

> thanks a lot. i will have a look at it soon ;)
i just would like to apologize for the delay and 
unfortunately i still didn't have enough time to 
carefully look at it. sorry.
as far as i can see there are already other users
of the taglib? comments?

regards,
david

Re: jcr-taglib (used to be portlets, etc.)

Posted by David Nuescheler <da...@gmail.com>.
hi edgar,

>  I uploaded a new version with a few more tags.
> If you want to evaluate the tags download this version. The previous was
> uploaded in the middle of the development process.
> jcr:session - Gets a session
> jcr:cd - Sets the current working directory
> jcr:nodes - Traverses the tree and iterates through the returned nodes
> jcr:properties - Iterates through the node properties
> jcr:set - Sets an attribute with the given jcr item
> jcr:out - Displays an item through a template engine.
> jcr:count - Displays the number of nodes for the given traverse strategy.
> jcr:size - Displays the cum. size of nodes for the given traverse strategy.
> jcr:versions - Traverses versions from the baseversion of the given node
> jcr:query - Performs a query and iterates through the returned nodes
> jcr:ifPresent - Processes the body if the jcr item exists.

thanks a lot. i will have a look at it soon ;)

regards,
david
----------------------------------------------------------------------
standardize your content-repository !
                               http://www.jcp.org/en/jsr/detail?id=170
---------------------------------------< david.nuescheler@day.com >---

This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying
to this message, and then delete it from your system. Thank you.

The sender does not assume any liability for timely, trouble free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.


mailto:david.nuescheler@day.com
http://www.day.com

David Nuescheler
Chief Technology Officer
Day Software AG
Barfuesserplatz 6 / Postfach
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97

Re: jcr-taglib (used to be portlets, etc.)

Posted by Edgar Poce <ed...@gmail.com>.
Hi david
  I uploaded a new version with a few more tags.
If you want to evaluate the tags download this version. The previous was 
uploaded in the middle of the development process.

Now the list includes:

jcr:session - Gets a session
jcr:cd - Sets the current working directory
jcr:nodes - Traverses the tree and iterates through the returned nodes
jcr:properties - Iterates through the node properties
jcr:set - Sets an attribute with the given jcr item
jcr:out - Displays an item through a template engine.
jcr:count - Displays the number of nodes for the given traverse strategy.
jcr:size - Displays the cum. size of nodes for the given traverse strategy.
jcr:versions - Traverses versions from the baseversion of the given node
jcr:query - Performs a query and iterates through the returned nodes
jcr:ifPresent - Processes the body if the jcr item exists.


Best regards
Edgar

Edgar Poce wrote:
> Hi david
> 
> David Nuescheler wrote:
> 
>> hi edgar,
>>
>>
>>>> one thing that i thought of, was to introduce
>>>> something like a "current working directory" that
>>>> allows simple navigation in nodes.
>>>> something like:
>>>> <jcr:cd path="/level1/mytest">
>>>>  <jcr:out path="../bla/mynode" />
>>>>  <jcr:out path="/app:myprop" />
>>>> </jcr:cd>
>>>
>>>
>>> I like the idea and I'll add it ASAP. But I would rename the attribute
>>> "path" to "node" or "item" because an EL expression might be used
>>> instead of the path. eg. "${myNode}" instead of "/pathToMyNode/MyNode".
>>
>>
>> hmmm... well, i am a bit attached to the path for a number of
>> reasons. for one in many situations people actually have a path
>> "hardcoded in their jsp template" rather than the actual items.
> 
> 
>> also, i think it may be an intersting feature of <jcr:cd> to skip
>> the section to the </jcr:cd> in case the path does not exist.
> 
> I like the feature. If "cd" behaves in that manner we should change 
> every tag in the set to ignore the body if the node doesn't exist. What 
> do you think of adding a conditional tag called "ifPresent"?.
> <jcr:ifPresent node="/myNode">
>   ... do some stuff
> </jcr:ifPresent>
> 
>> can we settle for having both a "path" and a "node" or an "item"...  
>> what do you think?
> 
> I wasn't clear, I meant that jcr:cd as all the tags in the set with a 
> node attribute should accept any of the following values:
> 1. EL expression. e.g. ${node}
> 2. Abstolute path. e.g. /pathToMyNode/myNode
> 3. Relative path. e.g. If not nested in a "cd" tag the path would be 
> relative to the root node.
> I thought that "node" was more descriptive, but if you still feel 
> atached to "path" I change it.
> 
>>
>>
>>>> i think this could also provide for more modular
>>>> jsp includes...
>>>> what do you think?
>>>
>>>
>>> Yes, it could. But I guess that won't be the most common use case. With
>>> jsp includes the jsp pages would lose control of the current working
>>> directory. I think the JCR tags should store data by default only in the
>>> page context in order to keep control of the surrounding session and
>>> current working directory. If anyone wants to store an Item in the
>>> request, session or servletcontext it can be done through the core jstl.
>>
>>
>> i initially thought of storing the <jcr:cd> stack in a request attribute
>> and until now i couldn't come up with a reason why that should be bad.
>> additionally, it allows for the described jsp nesting which we use very
>> frequently to render content-repository-based components of a page.
>> is there a drawback of storing it that way?
> 
> No, there's not, but in most cases I prefer to have a template with self 
> contained pieces as much as possible and thus facilitate reusability
> 
> What do you think of following jstl and adding a "scope" attribute?. As 
> in jstl the default would be page context and it would accept the 
> following values: default, request, session, application.
> 
>>
>> regards,
>> david
>>
> 
> regards
> edgar
> 

Re: jcr-taglib (used to be portlets, etc.)

Posted by Ben Pickering <be...@gmail.com>.
Hi

Has any thought been given to using a declarative, XSLT-like syntax
for producing output based on the repository content?   I was thinking
about a stylesheet syntax that mixed XSLT features with scriptlets
like JSP, that could all be compiled to a visitor.

Any stylesheet syntax would have to mix XHTML + Java (like JSP does). 
Adding some of XSLT's apply-template features simplifies working with
the repository's tree structure.

Pure XSLT itself is a bad fit as it's not appropriate to include
scriptlets. (Yes, you could create an intermediate XML document, but
the stylesheets are meant to be quick things to produce).

Cheers,
Ben.


Edgar Poce <ed...@gmail.com> wrote:
> Hi david
> 
> David Nuescheler wrote:
> > hi edgar,
> >
> >
> >>>one thing that i thought of, was to introduce
> >>>something like a "current working directory" that
> >>>allows simple navigation in nodes.
> >>>something like:
> >>><jcr:cd path="/level1/mytest">
> >>>  <jcr:out path="../bla/mynode" />
> >>>  <jcr:out path="/app:myprop" />
> >>></jcr:cd>
> >>
> >>I like the idea and I'll add it ASAP. But I would rename the attribute
> >>"path" to "node" or "item" because an EL expression might be used
> >>instead of the path. eg. "${myNode}" instead of "/pathToMyNode/MyNode".
> >
> > hmmm... well, i am a bit attached to the path for a number of
> > reasons. for one in many situations people actually have a path
> > "hardcoded in their jsp template" rather than the actual items.
> 
> > also, i think it may be an intersting feature of <jcr:cd> to skip
> > the section to the </jcr:cd> in case the path does not exist.
> I like the feature. If "cd" behaves in that manner we should change
> every tag in the set to ignore the body if the node doesn't exist. What
> do you think of adding a conditional tag called "ifPresent"?.
> <jcr:ifPresent node="/myNode">
>    ... do some stuff
> </jcr:ifPresent>
> 
> > can we settle for having both a "path" and a "node" or
> > an "item"...  what do you think?
> I wasn't clear, I meant that jcr:cd as all the tags in the set with a
> node attribute should accept any of the following values:
> 1. EL expression. e.g. ${node}
> 2. Abstolute path. e.g. /pathToMyNode/myNode
> 3. Relative path. e.g. If not nested in a "cd" tag the path would be
> relative to the root node.
> I thought that "node" was more descriptive, but if you still feel
> atached to "path" I change it.
> 
> >
> >
> >>>i think this could also provide for more modular
> >>>jsp includes...
> >>>what do you think?
> >>
> >>Yes, it could. But I guess that won't be the most common use case. With
> >>jsp includes the jsp pages would lose control of the current working
> >>directory.
> >>I think the JCR tags should store data by default only in the
> >>page context in order to keep control of the surrounding session and
> >>current working directory.
> >>If anyone wants to store an Item in the
> >>request, session or servletcontext it can be done through the core jstl.
> >
> > i initially thought of storing the <jcr:cd> stack in a request attribute
> > and until now i couldn't come up with a reason why that should be bad.
> > additionally, it allows for the described jsp nesting which we use very
> > frequently to render content-repository-based components of a page.
> > is there a drawback of storing it that way?
> No, there's not, but in most cases I prefer to have a template with self
> contained pieces as much as possible and thus facilitate reusability
> 
> What do you think of following jstl and adding a "scope" attribute?. As
> in jstl the default would be page context and it would accept the
> following values: default, request, session, application.
> 
> >
> > regards,
> > david
> >
> 
> regards
> edgar
>

Re: jcr-taglib (used to be portlets, etc.)

Posted by Edgar Poce <ed...@gmail.com>.
Hi david

David Nuescheler wrote:
> hi edgar,
> 
> 
>>>one thing that i thought of, was to introduce
>>>something like a "current working directory" that
>>>allows simple navigation in nodes.
>>>something like:
>>><jcr:cd path="/level1/mytest">
>>>  <jcr:out path="../bla/mynode" />
>>>  <jcr:out path="/app:myprop" />
>>></jcr:cd>
>>
>>I like the idea and I'll add it ASAP. But I would rename the attribute
>>"path" to "node" or "item" because an EL expression might be used
>>instead of the path. eg. "${myNode}" instead of "/pathToMyNode/MyNode".
> 
> hmmm... well, i am a bit attached to the path for a number of
> reasons. for one in many situations people actually have a path
> "hardcoded in their jsp template" rather than the actual items.

> also, i think it may be an intersting feature of <jcr:cd> to skip
> the section to the </jcr:cd> in case the path does not exist.
I like the feature. If "cd" behaves in that manner we should change 
every tag in the set to ignore the body if the node doesn't exist. What 
do you think of adding a conditional tag called "ifPresent"?.
<jcr:ifPresent node="/myNode">
   ... do some stuff
</jcr:ifPresent>

> can we settle for having both a "path" and a "node" or 
> an "item"...  what do you think?
I wasn't clear, I meant that jcr:cd as all the tags in the set with a 
node attribute should accept any of the following values:
1. EL expression. e.g. ${node}
2. Abstolute path. e.g. /pathToMyNode/myNode
3. Relative path. e.g. If not nested in a "cd" tag the path would be 
relative to the root node.
I thought that "node" was more descriptive, but if you still feel 
atached to "path" I change it.

> 
> 
>>>i think this could also provide for more modular
>>>jsp includes...
>>>what do you think?
>>
>>Yes, it could. But I guess that won't be the most common use case. With
>>jsp includes the jsp pages would lose control of the current working
>>directory. 
>>I think the JCR tags should store data by default only in the
>>page context in order to keep control of the surrounding session and
>>current working directory. 
>>If anyone wants to store an Item in the
>>request, session or servletcontext it can be done through the core jstl.
> 
> i initially thought of storing the <jcr:cd> stack in a request attribute
> and until now i couldn't come up with a reason why that should be bad.
> additionally, it allows for the described jsp nesting which we use very
> frequently to render content-repository-based components of a page.
> is there a drawback of storing it that way?
No, there's not, but in most cases I prefer to have a template with self 
contained pieces as much as possible and thus facilitate reusability

What do you think of following jstl and adding a "scope" attribute?. As 
in jstl the default would be page context and it would accept the 
following values: default, request, session, application.

> 
> regards,
> david
> 

regards
edgar

Limit of 65535 bytes per String value?

Posted by Timur Evdokimov <ti...@jacum.com>.
Hello everyone,

I just have been hit by a strange limitation of Jackrabbit
ObjectPersistenceManager.

I've got a custom property with String type and multiple="true" (which is
mapped to String[] Java type) 
The problem is that Jackrabbit writes these Strings internally using
DataOutputStream.writeUTF method, which throws UTFDataFormatException when
the number of bytes required to save that string is effectively more than
2^16, thus 65535

That leaves me to worry, because I thought I could have used these String[]
fields for multi-page articles and online books on my site. The only option
I've left to is use of multiple Binary field which could store fields any
length. However APIs for Binary fields works with InputStream! 

Because of this, my neat and nice 

setProperty("text", new String[] {xxx, yyy, ...}); 

would suddenly explode into full-blown method or even class of its own!

Were there any REAL reasons to limit Strings length by 65535? 
JCR spec, at a first quick sweep through, says nothing about it.

So I've made some quick changes to ObjectPersistenceManager, replacing
read/writeUTF with byte-wise String persistence, and it works for me.
Attached comes the copy.

Regards,
Timur

Re: jcr-taglib (used to be portlets, etc.)

Posted by David Nuescheler <da...@gmail.com>.
hi edgar,

> > one thing that i thought of, was to introduce
> > something like a "current working directory" that
> > allows simple navigation in nodes.
> > something like:
> > <jcr:cd path="/level1/mytest">
> >   <jcr:out path="../bla/mynode" />
> >   <jcr:out path="/app:myprop" />
> > </jcr:cd>
> I like the idea and I'll add it ASAP. But I would rename the attribute
> "path" to "node" or "item" because an EL expression might be used
> instead of the path. eg. "${myNode}" instead of "/pathToMyNode/MyNode".
hmmm... well, i am a bit attached to the path for a number of
reasons. for one in many situations people actually have a path
"hardcoded in their jsp template" rather than the actual items.
also, i think it may be an intersting feature of <jcr:cd> to skip
the section to the </jcr:cd> in case the path does not exist.
can we settle for having both a "path" and a "node" or 
an "item"...  what do you think?

> > i think this could also provide for more modular
> > jsp includes...
> > what do you think?
> Yes, it could. But I guess that won't be the most common use case. With
> jsp includes the jsp pages would lose control of the current working
> directory. 
> I think the JCR tags should store data by default only in the
> page context in order to keep control of the surrounding session and
> current working directory. 
> If anyone wants to store an Item in the
> request, session or servletcontext it can be done through the core jstl.
i initially thought of storing the <jcr:cd> stack in a request attribute
and until now i couldn't come up with a reason why that should be bad.
additionally, it allows for the described jsp nesting which we use very
frequently to render content-repository-based components of a page.
is there a drawback of storing it that way?

regards,
david

Re: jcr-taglib (used to be portlets, etc.)

Posted by Edgar Poce <ed...@gmail.com>.
Hi david

David Nuescheler wrote:
> hi edgar,
> 
> 
>>I'm working on a set of tags that reads and displays jcr 
>>data. You can plug your custom traverse strategy and 
>>template engine, so I guess it fits your needs as long 
>>as you use jsp instead of xml/xsl for rendering your 
>>portlets.
>>http://cablemodem.fibertel.com.ar/edgarpoce/
> 
> cool, very interesting. i thought about 
> something similar too.
> when i looked at your the set of tags i saw
> a lot of similarities.
> 
> one thing that i thought of, was to introduce 
> something like a "current working directory" that
> allows simple navigation in nodes.
> something like:
> 
> <jcr:cd path="/level1/mytest">
>   <jcr:out path="../bla/mynode" />
>   <jcr:out path="/app:myprop" />
> </jcr:cd>
I like the idea and I'll add it ASAP. But I would rename the attribute
"path" to "node" or "item" because an EL expression might be used
instead of the path. eg. "${myNode}" instead of "/pathToMyNode/MyNode".

> 
> i think this could also provide for more modular
> jsp includes... 
> what do you think?
Yes, it could. But I guess that won't be the most common use case. With
jsp includes the jsp pages would lose control of the current working
directory. I think the JCR tags should store data by default only in the
page context in order to keep control of the surrounding session and
current working directory. If anyone wants to store an Item in the
request, session or servletcontext it can be done through the core jstl.

> 
> i initially thought of hooking-up the template 
> engine concept slightly differently. 
what's your idea?

> overall it seems very interesting and i think it 
> could be valuable for the entire jcr community 
> to have well-known tag libraries.
You are free to add it to jackrabbit. I'd be happy to help.

> 
> regards,
> david

Edgar
> ----------------------------------------------------------------------
> standardize your content-repository !
>                                http://www.jcp.org/en/jsr/detail?id=170
> ---------------------------------------< david.nuescheler@day.com >---
> 
> This message is a private communication. If you are not the intended
> recipient, please do not read, copy, or use it, and do not disclose it
> to others. Please notify the sender of the delivery error by replying
> to this message, and then delete it from your system. Thank you.
> 
> The sender does not assume any liability for timely, trouble free,
> complete, virus free, secure, error free or uninterrupted arrival of
> this e-mail. For verification please request a hard copy version.
> 
> 
> mailto:david.nuescheler@day.com
> http://www.day.com
> 
> David Nuescheler
> Chief Technology Officer
> Day Software AG
> Barfuesserplatz 6 / Postfach
> 4001 Basel
> Switzerland
> 
> T  41 61 226 98 98
> F  41 61 226 98 97
> 


Re: Jackrabbit and MPEG-21

Posted by David Dabbs <da...@dabbs.net>.
> david.nuescheler wrote
> looking at the above information model it seems like mpeg21 could also be
> modeled into a nodetype hierarchy and therefore be natively represented in
> a content repository.
>
> does this make sense?

Absolutely. That's why I suggested MPEG-21 'awareness' or compatibility for
the JCR.

David,

Thanks for your answer and your interest. I sent e-mails to a number of
folks who might be able to give some insight into the question of IP
encumbrances for MPEG-21. Jeroen Bekaert of LANL responded. He pointed me to
a post by Herbert van de Sompel (LANL creator of OpenURL) 

   http://sourceforge.net/mailarchive/message.php?msg_id=10818549

which basically says "we (MPEG committee) want DID open and _all_ MPEG-21
related XML openly published by ISO."


Best,

David