On Wed, 2003-06-25 at 21:32, Jewett, Jim J wrote:
> Patrick Ohly
> 
> > I have already verified manually that it is possible to replace
> > the <a href="javascript"></a> with a <form>...</form>, but this
> > doesn't really help I guess. Is there any way how I can cause
> > any of the plucker frontends to trigger a POST operation and then
> > include the result in the pdb file? 
> 
> Python can handle posts.  (url-fetching functions take an optional
> third argument of "data".)  PyPlucker has some support for it, but
> not quite.  (It may be urltext_key).  To my knowledge, you would
> probably have to make code changes.
> 
> Part of the catch is that post actions are supposed to involve
> the user saying "yes, I really want to do this", but get actions
> can be automatic.  This means that at a properly designed site,
> GET is safe, but POST might order thousands of dollars worth
> of junk.  You don't want that happening by accident.

Correct, so the default really should be not to submit forms.
Suppose I wanted to extend either PyPlucker or JPluck to do
that, what would be a good rule to decide when a form is to be
treated like a link and when not?

I can think of one criteria that should prevent submitting a form:
if the form has visible input fields, then an automated posting
probably makes no sense. Unfortunately the opposite is not true:
even if all fields are hidden, posting the form might still have
undesired side effects.

I guess I'll just settle for a Python front-end script that downloads
the initial page, downloads the other pages using POST and then
calls JPluck to convert the local files.

> > Ideally, I'd let JPluck transform the starting page with XSLT
> > automatically. As I have never used XSLT before, I am looking for
> > an easier way to debug a stylesheet than running JPluck on
> > a page and looking at the resulting pdb: in particular, it would
> > be nice to get a serial dump of the parse tree that the stylesheet
> > is applied to and the result of the transformation.
> 
> I agree, but can't offer much help just yet.  I have heard that IE 
> can use the same XSLT, which might speed your testing.

I get the pages transformed as desired with xsltproc, but
not if I use the same stylesheet in JPluck directly. Hmm,
looking at the source of JPluck I found Transform.java and
transform.jar, which I should probably have used instead of
xstlproc.

[a little while latter]

java -jar transform.jar also works as expected, but I still
cannot use stylesheets in JPluck 2.0 pre 5 directly. Here's
what I did:

- clean the start page with JPluck 0.9
- transform clean start page with transform.jar from JPluck 2.0
- convert transformed page with convert.jar from JPluck 2.0
-> pdb looks as expected

- convert the original, uncleaned (but downloaded) page
  with JPluck 2.0, applying my stylesheet on-the-fly
-> pdb shows that stylesheet was applied, but most of the text
   is missing

- convert the page that was cleaned by JPluck 0.9 with
  JPluck 2.0, applying the my stylesheet on-the-fly
-> same problem

It seems to me that doing the xsl transformation on-the-fly
somehow leads to different results than doing it seperately,
even if the same Java class is used.

How can I debug this problem? I could provide the page
that I try to plug and my xsl/jxl files, if that would
help.

-- 
Freundliche Gruesse / Best Regards

Patrick Ohly
Senior Software Engineer
--------------------------------------------------------------------
//// pallas 
Pallas GmbH / Hermuelheimer Str. 10 / 50321 Bruehl / Germany
[EMAIL PROTECTED] / www.pallas.com
Tel +49-2232-1896-30 / Fax +49-2232-1896-29
--------------------------------------------------------------------

_______________________________________________
plucker-list mailing list
[EMAIL PROTECTED]
http://lists.rubberchicken.org/mailman/listinfo/plucker-list

Reply via email to