You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeremy Quinn <je...@media.demon.co.uk> on 2000/07/05 10:54:25 UTC

TagLib Questions

Dea All,


If I could just drag your minds away from C2 for a moment .....

I am writing a TagLib, to donate to the Cocoon Project (as seen on
Cocoon-Users).

It is tentatively called XFP (eXtensible Form Processor).

I currently use this NameSpace:

	xmlns:xfp="http://www.hrc.wmin.ac.uk/2000/XSP/XFP"

Should I change this to an Apache NameSpace, if so, what?
I would rather not have to change this _after_ release ......

My packages are currently:

	uk.ac.wmin.hrc.jermq.xsp.xfp.XFPLibrary
	uk.ac.wmin.hrc.jermq.xsp.xfp.XFPResource
	uk.ac.wmin.hrc.jermq.xsp.xfp.XFPError

Should I change these to Apache , if so, what?


I have a problem with Xerces that stops me implementing XSchemas for field
validation. The idea is that you put a reference to a Schema in your source
file,
XFPTagLib would use a RevalidatingDOMParser to parse resources, allowing
them to be revalidated once modified. To implement this I need
Xerces_1_1_2, which does not currently appear to work with C1.7.5-dev.

Has anyone any clues on getting the new Xerces running on C1?

During the course of it's execution, XFPTagLib creates it's own DOMParsers,
OutputFormat and SerializerFactory.

I'd like to get these Objects in the most efficient way, hopefully preset
according to Cocoon.properties for the types of XML I am dealing with.

How can the library classes of a TagLib do this?


Thanks for any help.

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>

Re: TagLib Questions

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 13:35 +0200 05/07/00, Stefano Mazzocchi wrote:

>> I am writing a TagLib
>> It is tentatively called XFP (eXtensible Form Processor).
>
>Hmmmm, nah, too similar to XSP... too hard to pronounce somethign like
>"XFP for XSP"... let's try to come up with something better.

Whoops! I see your point.

OK, so working out what the TagLib is about, would be a good start to work
out a name for it.
I would be happy to get suggestions .....

The main purpose is to handle Form building from file and saving to file.
The TagLib does not have verbs that are specific to Forms per se, except it
does handle the difference between POST and GET. The TagLib uses XPath to
define structures to read and write.

Here are the main Tags, (with most of their attributes missing).

<xfp:form/>

	top level container, outputs <xfp-form action="" ......>

<xfp:resource id="..">
	<xfp:resource-file/><xfp:resource-node/><xfp:write-mode/>
</xfp:resource>

	outputs nothing (except in case of error with file)
	identifies which files to work with

<xfp:field>

	outputs <xfp-field name="" ......> with results of XPath (read or write)
query inside

	<xfp:if-post> / <xfp:if-get>

		outputs logic

	<xfp:read/> / <xfp:write as="string|node" to="resourceID"
select="xpath" > datasource </xfp:write>

		outputs
			<xfp-result errors=".." select=".." .... > result of read/write, or
error report </xfp-result>

</xfp:field>

The TagLib can be used for building and saving forms, though it could also
be used for a mini search engine, a logger or hit recorder, all sorts. The
output of the TagLib could look more like one of the XML-Form specs, though
that is another issue ....

It is a utility or toolset that handles Forms and Files using XPath

xrp:/erp: (external resource processor),
rp: (resource processor),
fp: (file processor),
ft: (file/form tools),
xff: (xpath, files & forms)
xq: (xpath query)
xpt: (xpath tool)
xrq: (xpath resource query)

etc. etc.

Maybe I made a mistake, choosing form-like names for some of the Tags,
maybe it would be better to use a generic <xpath-query/> <xpath-result/>
type naming paradigm.

Suggestions anyone?


>http://apache.org/cocoon/XSP/[taglib]/[version]
>
>> I would rather not have to change this _after_ release ......
>
>So use the second one.

OK

>> My packages are currently
[snip]
>> Should I change these to Apache , if so, what?
>
>hmmm, good question.
>
>currently there is no location for taglibs and logicsheets but I'd like
>to create one
>
>Ricardo, any suggestion?

No Hurry, this can change at a later date without effecting anybody.

There was talk of putting this kind of thing in a "donations" directory.
I don't know if this means including the source in the Cocoon build like
the core code, or as a standalone .JAR (with source/dox inside) like the
other packages that come with Cocoon.

>> I have a problem with Xerces that stops me implementing XSchemas for field
>> validation. The idea is that you put a reference to a Schema in your source
>> file,
>> XFPTagLib would use a RevalidatingDOMParser to parse resources, allowing
>> them to be revalidated once modified. To implement this I need
>> Xerces_1_1_2, which does not currently appear to work with C1.7.5-dev.
>
>Why not? What's the problem?

I just get errors (I have seen various), nothing will render on my system.
I have found instances in the Xerces 1.1.2 build of missing Classes, due to
MakeFiles in the Dist being out of date. For instance the
RevalidatingDOMParser source exists, but not the class.
(Sorry Xerces team for not reporting this earlier).

So, TBH I do not know whether the problem is due to changes breaking
Cocoon's use of Xerces, or just the fact that is is a bad build.

>> How can the library classes of a TagLib do this?
>
>Sorry, I'm not sure I get your question.

Maybe it is because I misunderstand my problem ....

To get a DOMParser from inside a TagLib, I can ask Cocoon for xspParser, right?

I also need an OutputFormat and SerializerFactory. I would like if possible
to get these objects from Cocoon, preset with the correct output settings,
according to the settings in cocoon.properties, formatters section.

Like : preserve-space, indent, indenting, line-width, encoding etc.


Thanks for your help

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pa...@sms.genie.co.uk>

Re: TagLib Questions

Posted by Stefano Mazzocchi <st...@apache.org>.
Jeremy Quinn wrote:
> 
> Dea All,
> 
> If I could just drag your minds away from C2 for a moment .....

hmmm, ok. :)
 
> I am writing a TagLib, to donate to the Cocoon Project (as seen on
> Cocoon-Users).
> 
> It is tentatively called XFP (eXtensible Form Processor).

Hmmmm, nah, too similar to XSP... too hard to pronounce somethign like
"XFP for XSP"... let's try to come up with something better.

> I currently use this NameSpace:
> 
>         xmlns:xfp="http://www.hrc.wmin.ac.uk/2000/XSP/XFP"
> 
> Should I change this to an Apache NameSpace, if so, what?

current namespaces have the form

http://www.apache.org/cocoon/[year]/XSP/[taglib]

but C2 will change the above into

http://apache.org/cocoon/XSP/[taglib]/[version]

> I would rather not have to change this _after_ release ......

So use the second one.
 
> My packages are currently:
> 
>         uk.ac.wmin.hrc.jermq.xsp.xfp.XFPLibrary
>         uk.ac.wmin.hrc.jermq.xsp.xfp.XFPResource
>         uk.ac.wmin.hrc.jermq.xsp.xfp.XFPError
> 
> Should I change these to Apache , if so, what?

hmmm, good question.

currently there is no location for taglibs and logicsheets but I'd like
to create one

Ricardo, any suggestion?
 
> I have a problem with Xerces that stops me implementing XSchemas for field
> validation. The idea is that you put a reference to a Schema in your source
> file,
> XFPTagLib would use a RevalidatingDOMParser to parse resources, allowing
> them to be revalidated once modified. To implement this I need
> Xerces_1_1_2, which does not currently appear to work with C1.7.5-dev.

Why not? What's the problem?
 
> Has anyone any clues on getting the new Xerces running on C1?

No, haven't tried that yet.
 
> During the course of it's execution, XFPTagLib creates it's own DOMParsers,
> OutputFormat and SerializerFactory.
> 
> I'd like to get these Objects in the most efficient way, hopefully preset
> according to Cocoon.properties for the types of XML I am dealing with.
>
> How can the library classes of a TagLib do this?

Sorry, I'm not sure I get your question.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------