You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Andreas Probst <an...@gmx.net> on 2002/10/28 17:35:47 UTC

Content-Language

Hi all,

the WebDAV spec defines the property DAV:getcontentlanguage. 
It's a live one, so I can't change it via Proppatch. 

I would like the user to set the language so other users know, 
which language a resource contains. How can I make use of 
DAV:getcontentlanguage? Or should I just define another dead 
property which holds this information?

Thanks in advance.

Andreas



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Content-Language

Posted by Andreas Probst <an...@gmx.net>.
On 29 Oct 2002 at 10:46, Julian Reschke wrote:

> > > Not true. "live" doesn't necessarily mean "read-only".
> >
> > OK, I've just realized that I had misunderstood this. But
> > unfortunatly this won't help me very much.
> >
> > Class org.apache.slide.content.NodeProperty has the following
> > four methods:
> > .isComputed()
> > .isDeadProperty()
> > .isLiveProperty()
> > .isProtected()
> >
> > Which combinations are supposed to indicate that a property is
> > writable?
> 
> if (! prop.isProtected()) ....
> 
> > > > I would like the user to set the language so other users know,
> > > > which language a resource contains. How can I make use of
> > > > DAV:getcontentlanguage? Or should I just define another dead
> > > > property which holds this information?
> > >
> > > No. You should use DAV:getcontentlanguage.
> > >
> >
> > I tried it and observed the following:
> >
> > - I can proppath DAV:getcontentlanguage to a collection resource,
> > where it hasn't been set yet. It will accept even Strings like
> > "deutsch", although it should be "de" (see 3.10 Language Tags in
> > RFC2068-Http/1.1)
> 
> I'd say: these are implementation details.
> 
> > - I can't change DAV:getcontentlanguage on a collection resource,
> > where it has already been set
> >
> > - I can't change DAV:getcontentlanguage on a file resource. It's
> > set to "en" by default during create.
> 
> IMHO, that's a bug-
> 
> > - Slide client 1.0.16 will say succeeded after Proppatch,
> > although it did not succeed (Tomcat log says Rollback Transaction
> > and it isn't changed)
> 
> Do you have a trace?

This is Slide client 1.0.16. test1 is a collection. I set scope 
to /files

[LOCALHOST] /dms/kurs2/ $ propput /dms/kurs2/test1 getcontentlanguage de
Putting property(getcontentlanguage, de) to '/dms/kurs2/test1': succeeded.

That's what Slide logs. I think this doesn't say so much.

29 Oct 2002 11:08:16 - org.apache.slide.transaction.SlideTransactionManager - WARNING - Rollback Transaction 10 xid HttpProcessor[8080][4]-1035886096821-10- in thread HttpProcessor[8080][4]
29 Oct 2002 11:08:16 - org.apache.slide.webdav.WebdavServlet - INFO - PROPPATCH = 207 Multi-Status (time: 631 ms) URI = /files/kurs2/test1

Another try with a file:

[LOCALHOST] /dms/kurs2/ $ propput /dms/kurs2/t1.txt 
getcontentlanguage de
Putting property(getcontentlanguage, de) to '/dms/kurs2/t1.txt': 
succeeded.

29 Oct 2002 11:11:17 - 
org.apache.slide.transaction.SlideTransactionManager - WARNING - 
Rollback Transaction 11 xid HttpProcessor[8080][4]-1035886275608-
11- in thread HttpProcessor[8080][4]
29 Oct 2002 11:11:17 - org.apache.slide.webdav.WebdavServlet - 
INFO - PROPPATCH = 207 Multi-Status (time: 1803 ms) URI = 
/files/kurs2/t1.txt


Then I tried it as user root on a new file:

*1st try: the same like above, DAV:checked-in property set to 
new version 1.1, but no new version under associated VHR.

*2nd try: like 1st try

*3rd try: now it gets interesting, revision not found:

[LOCALHOST] /dms/kurs2/ $ propput /dms/kurs2/t2.txt 
getcontentlanguage de
Putting property(getcontentlanguage, de) to '/dms/kurs2/t2.txt': 
failed.
Internal Server Error (500)

Slide log:
org.apache.slide.content.RevisionDescriptorNotFoundException: No revision descriptor found on object /history/7
        at slidestore.reference.JDBCDescriptorsStore.retrieveRevisionDescriptor(JDBCDescriptorsStore.java:1567)
        at org.apache.slide.store.StandardStore.retrieveRevisionDescriptor(StandardStore.java:560)
        at org.apache.slide.content.ContentImpl.store(ContentImpl.java:979)
        at org.apache.slide.webdav.util.VersioningHelper.checkout(VersioningHelper.java:816)
        at org.apache.slide.webdav.method.PropPatchMethod.executeRequest(PropPatchMethod.java:298)
        at org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMethod.java:324)
        at org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:221)

29 Oct 2002 11:20:41 - org.apache.slide.transaction.SlideTransactionManager - WARNING - Rollback Transaction 23 xid HttpProcessor[8080][4]-1035886841592-23- in thread HttpProcessor[8080][4]
29 Oct 2002 11:20:41 - org.apache.slide.webdav.WebdavServlet - INFO - PROPPATCH = 500 Internal Server Error (time: 50 ms) URI = /files/kurs2/t2.txt

Now the DAV:checked-in property is set back to still version 1.0 

OK

*4th try: now forbidden

[LOCALHOST] /dms/kurs2/ $ propput /dms/kurs2/t2.txt 
getcontentlanguage de
Putting property(getcontentlanguage, de) to '/dms/kurs2/t2.txt': 
failed.
Forbidden (403)

29 Oct 2002 11:25:33 - 
org.apache.slide.transaction.SlideTransactionManager - WARNING - 
Rollback Transaction 24 xid HttpProcessor[8080][4]-1035887133312-
24- in thread HttpProcessor[8080][4]
29 Oct 2002 11:25:33 - org.apache.slide.webdav.WebdavServlet - 
INFO - PROPPATCH = 403 Forbidden (time: 20 ms) URI = 
/files/kurs2/t2.txt

Version stays 1.0

*5th try: like 4th try

*Now new start of Tomcat server:

*1th try: now revision 1.1 already exists

[LOCALHOST] /dms/kurs2/ $ propput /dms/kurs2/t2.txt 
getcontentlanguage de
Putting property(getcontentlanguage, de) to '/dms/kurs2/t2.txt': 
failed.
Internal Server Error (500)

org.apache.slide.content.RevisionAlreadyExistException: Revision 
1.1 already exists on object /history/7
        at 
slidestore.reference.FileContentStore.createRevisionContent(FileC
ontentStore.java:294)
        at 
org.apache.slide.store.AbstractStore.createRevisionContent(Abstra
ctStore.java:1225)
        at 
org.apache.slide.store.StandardStore.createRevisionContent(Standa
rdStore.java:654)
        at 
org.apache.slide.content.ContentImpl.create(ContentImpl.java:1215
)
        at 
org.apache.slide.content.ContentImpl.create(ContentImpl.java:680)
        at 
org.apache.slide.webdav.util.VersioningHelper.checkin(VersioningH
elper.java:1187)
        at 
org.apache.slide.webdav.method.PropPatchMethod.executeRequest(Pro
pPatchMethod.java:343)
        at 
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractW
ebdavMethod.java:324)
        at 
org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:
221)

29 Oct 2002 11:31:21 - 
org.apache.slide.transaction.SlideTransactionManager - WARNING - 
Rollback Transaction 5 xid HttpProcessor[8080][3]-1035887480951-
5- in thread HttpProcessor[8080][3]
29 Oct 2002 11:31:21 - org.apache.slide.webdav.WebdavServlet - 
INFO - PROPPATCH = 500 Internal Server Error (time: 381 ms) URI 
= /files/kurs2/t2.txt

*2nd try: now Slide client says succeeded again, but rollback in 
slide log

I stop here.

> 
> > - Slide client 2 (CVS 19 Oct) will exit to Windows command line
> > without any message
> >
> >
> > So what should I do to set the content language of a resource?
> 
> Well, set DAV:getcontentlanguage. You shouldn't let bugs in specific
> implementations influence your design decisions.
> 
> Julian
> 
> --
> <green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Content-Language

Posted by Julian Reschke <ju...@gmx.de>.
> From: Andreas Probst [mailto:andpro77@gmx.net]
> Sent: Tuesday, October 29, 2002 10:40 AM
> To: Slide Users Mailing List
> Subject: RE: Content-Language
>
>
> Hi Julian, thank you for your response.
>
> Hi all,
>
> I have two questions regarding properties. Please, see
> intermixed.
>
> Thanks
>
> Andreas
>
>
> On 28 Oct 2002 at 17:47, Julian Reschke wrote:
>
> > > From: Andreas Probst [mailto:andpro77@gmx.net]
> > > Sent: Monday, October 28, 2002 5:36 PM
> > > To: Slide Users Mailing List
> > > Subject: Content-Language
> > >
> > >
> > > Hi all,
> > >
> > > the WebDAV spec defines the property DAV:getcontentlanguage.
> > > It's a live one, so I can't change it via Proppatch.
> >
> > Not true. "live" doesn't necessarily mean "read-only".
>
> OK, I've just realized that I had misunderstood this. But
> unfortunatly this won't help me very much.
>
> Class org.apache.slide.content.NodeProperty has the following
> four methods:
> .isComputed()
> .isDeadProperty()
> .isLiveProperty()
> .isProtected()
>
> Which combinations are supposed to indicate that a property is
> writable?

if (! prop.isProtected()) ....

> > > I would like the user to set the language so other users know,
> > > which language a resource contains. How can I make use of
> > > DAV:getcontentlanguage? Or should I just define another dead
> > > property which holds this information?
> >
> > No. You should use DAV:getcontentlanguage.
> >
>
> I tried it and observed the following:
>
> - I can proppath DAV:getcontentlanguage to a collection resource,
> where it hasn't been set yet. It will accept even Strings like
> "deutsch", although it should be "de" (see 3.10 Language Tags in
> RFC2068-Http/1.1)

I'd say: these are implementation details.

> - I can't change DAV:getcontentlanguage on a collection resource,
> where it has already been set
>
> - I can't change DAV:getcontentlanguage on a file resource. It's
> set to "en" by default during create.

IMHO, that's a bug-

> - Slide client 1.0.16 will say succeeded after Proppatch,
> although it did not succeed (Tomcat log says Rollback Transaction
> and it isn't changed)

Do you have a trace?

> - Slide client 2 (CVS 19 Oct) will exit to Windows command line
> without any message
>
>
> So what should I do to set the content language of a resource?

Well, set DAV:getcontentlanguage. You shouldn't let bugs in specific
implementations influence your design decisions.

Julian

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Content-Language

Posted by Andreas Probst <an...@gmx.net>.
Hi Julian, thank you for your response.

Hi all,

I have two questions regarding properties. Please, see 
intermixed.

Thanks

Andreas


On 28 Oct 2002 at 17:47, Julian Reschke wrote:

> > From: Andreas Probst [mailto:andpro77@gmx.net]
> > Sent: Monday, October 28, 2002 5:36 PM
> > To: Slide Users Mailing List
> > Subject: Content-Language
> > 
> > 
> > Hi all,
> > 
> > the WebDAV spec defines the property DAV:getcontentlanguage. 
> > It's a live one, so I can't change it via Proppatch. 
> 
> Not true. "live" doesn't necessarily mean "read-only".

OK, I've just realized that I had misunderstood this. But 
unfortunatly this won't help me very much.

Class org.apache.slide.content.NodeProperty has the following 
four methods:
.isComputed()
.isDeadProperty()
.isLiveProperty()
.isProtected()

Which combinations are supposed to indicate that a property is 
writable?


>  
> > I would like the user to set the language so other users know, 
> > which language a resource contains. How can I make use of 
> > DAV:getcontentlanguage? Or should I just define another dead 
> > property which holds this information?
> 
> No. You should use DAV:getcontentlanguage.
> 

I tried it and observed the following:

- I can proppath DAV:getcontentlanguage to a collection resource, where it hasn't been set yet. It will accept even Strings like "deutsch", although it should be "de" (see 3.10 Language Tags in RFC2068-Http/1.1)

- I can't change DAV:getcontentlanguage on a collection resource, where it has already been set

- I can't change DAV:getcontentlanguage on a file resource. It's set to "en" by default during create.

- Slide client 1.0.16 will say succeeded after Proppatch, although it did not succeed (Tomcat log says Rollback Transaction and it isn't changed)

- Slide client 2 (CVS 19 Oct) will exit to Windows command line without any message


So what should I do to set the content language of a resource?

Andreas

> Julian
> 
> --
> <green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Content-Language

Posted by Julian Reschke <ju...@gmx.de>.
> From: Andreas Probst [mailto:andpro77@gmx.net]
> Sent: Monday, October 28, 2002 5:36 PM
> To: Slide Users Mailing List
> Subject: Content-Language
> 
> 
> Hi all,
> 
> the WebDAV spec defines the property DAV:getcontentlanguage. 
> It's a live one, so I can't change it via Proppatch. 

Not true. "live" doesn't necessarily mean "read-only".
 
> I would like the user to set the language so other users know, 
> which language a resource contains. How can I make use of 
> DAV:getcontentlanguage? Or should I just define another dead 
> property which holds this information?

No. You should use DAV:getcontentlanguage.

Julian

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>