You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Daniel Kucharski <Da...@vub.ac.be> on 2005/12/10 15:28:09 UTC
Sax parser problems
Greetings, appearantly my SAXparser has problems sometimes with scanning my
xml files.
For instance, i get this error:
Unable to read context:/WEB-INF/SimpleInstanceViewer.jwc: Attribute
"java-type" must be declared for element type "parameter".
This file contains:
<?xml version="1.0" ?>
<!DOCTYPE component-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<component-specification allow-body="no"
allow-informal-parameters="no"
class="view.components.SimpleInstanceViewer">
<parameter java-type="java.lang.Object" name="instance" direction="in"
required="yes"/>
<component id="elements" type="Foreach">
<inherited-binding name="source" parameter-name="source"/>
</component>
<component id="cells" type="Foreach">
<binding name="source" expression="components.elements.value"/>
</component>
</component-specification>
So the java-type actuallly does exists.
Anyone a clue ?
Thx
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Sax parser problems
Posted by Geoff Longman <gl...@gmail.com>.
Make sure you don't have a tag in the template called 'source'.
ie. <span jwcid="personDetails" source="something"/>
If you do remove it. If you need it to stay in the template then change:
<component-specification allow-body="no"
allow-informal-parameters="no"
class="view.components.SimpleInstanceViewer">
so that allow-informal-parameters="yes".
Geoff
On 12/11/05, Daniel Kucharski <Da...@vub.ac.be> wrote:
> Ok, thanks, appearantly i was following a T3 tutorial on the net :)
>
>
> Still, i have following problem, when writing a new controller:
>
> 5 <page-specification class="controller.Home">
> 6 <description>
> 7 Start page
> 8 </description>
> 9 <component id="personDetails" type="SimpleInstanceViewer">
> 10 <binding name="instance" value="getCurrentInstance()"/>
> 11 </component>
> 12
> 13 </page-specification>
>
>
> I have this error now: Component Home/personDetails allows only formal
> parameters, binding source is not allowed.
>
>
>
> The component specification:
>
> <?xml version="1.0" ?>
> <!DOCTYPE component-specification PUBLIC
> "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> <component-specification allow-body="no"
> allow-informal-parameters="no"
> class="view.components.SimpleInstanceViewer">
> <parameter name="instance" required="yes"/>
> </component-specification>
>
>
> I tried with other binding names, but nothing works.
>
>
>
>
> -----Oorspronkelijk bericht-----
> Van: Geoff Longman [mailto:glongman@gmail.com]
> Verzonden: zaterdag 10 december 2005 20:25
> Aan: Tapestry users
> Onderwerp: Re: Sax parser problems
>
> I read the first post wrong.
>
> drop all reference to 'java-type' (the 1.3 DTD) or 'type' if you have any
> files using 3.0 DTD. Tapestry 4 discerns the type all by itself now.
>
> Also, T4 parameters no longer need to specify a direction (and they
> can't) so drop the 'direction's too.
>
> G
>
> On 12/10/05, Ron Piterman <rp...@gmx.net> wrote:
> > its not a problem of the sax parser, but rather of the document.
> > you have to update your xml. It seems you are porting from 3, and
> > there are some changes in the dtd:
> > as far as I can remember, java-type attribute never existed - but I
> > might be wrong on that. anyway, it doesn"t exist any more in 4, and
> > also the direction attribute was completlet removed.
> > please consult the upgrading from 3.
> > also there is in the wiki ( it think in wiki / tapestry 4 / howtos,
> > but am not sure ) links to two libraries that make some of the tasks
> > of converting xml from 3 to 4.
> > good luck,
> > Ron
> >
> >
> > Daniel Kucharski wrote:
> > > Greetings, appearantly my SAXparser has problems sometimes with
> > > scanning my xml files.
> > >
> > >
> > > For instance, i get this error:
> > >
> > > Unable to read context:/WEB-INF/SimpleInstanceViewer.jwc: Attribute
> > > "java-type" must be declared for element type "parameter".
> > >
> > > This file contains:
> > >
> > > <?xml version="1.0" ?>
> > > <!DOCTYPE component-specification PUBLIC
> > > "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> > > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> > > <component-specification allow-body="no"
> > > allow-informal-parameters="no"
> > > class="view.components.SimpleInstanceViewer">
> > > <parameter java-type="java.lang.Object" name="instance"
> direction="in"
> > > required="yes"/>
> > > <component id="elements" type="Foreach">
> > > <inherited-binding name="source" parameter-name="source"/>
> > > </component>
> > > <component id="cells" type="Foreach">
> > > <binding name="source" expression="components.elements.value"/>
> > > </component>
> > > </component-specification>
> > >
> > >
> > > So the java-type actuallly does exists.
> > >
> > > Anyone a clue ?
> > >
> > >
> > > Thx
> > >
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail:
> > > tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> The Spindle guy. http://spindle.sf.net
> Get help with Spindle:
> http://lists.sourceforge.net/mailman/listinfo/spindle-user
> Announcement Feed:
> http://www.jroller.com/rss/glongman?catname=/Announcements
> Feature Updates: http://spindle.sf.net/updates
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
The Spindle guy. http://spindle.sf.net
Get help with Spindle:
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates: http://spindle.sf.net/updates
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Sax parser problems
Posted by Daniel Kucharski <Da...@vub.ac.be>.
Ok, thanks, appearantly i was following a T3 tutorial on the net :)
Still, i have following problem, when writing a new controller:
5 <page-specification class="controller.Home">
6 <description>
7 Start page
8 </description>
9 <component id="personDetails" type="SimpleInstanceViewer">
10 <binding name="instance" value="getCurrentInstance()"/>
11 </component>
12
13 </page-specification>
I have this error now: Component Home/personDetails allows only formal
parameters, binding source is not allowed.
The component specification:
<?xml version="1.0" ?>
<!DOCTYPE component-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<component-specification allow-body="no"
allow-informal-parameters="no"
class="view.components.SimpleInstanceViewer">
<parameter name="instance" required="yes"/>
</component-specification>
I tried with other binding names, but nothing works.
-----Oorspronkelijk bericht-----
Van: Geoff Longman [mailto:glongman@gmail.com]
Verzonden: zaterdag 10 december 2005 20:25
Aan: Tapestry users
Onderwerp: Re: Sax parser problems
I read the first post wrong.
drop all reference to 'java-type' (the 1.3 DTD) or 'type' if you have any
files using 3.0 DTD. Tapestry 4 discerns the type all by itself now.
Also, T4 parameters no longer need to specify a direction (and they
can't) so drop the 'direction's too.
G
On 12/10/05, Ron Piterman <rp...@gmx.net> wrote:
> its not a problem of the sax parser, but rather of the document.
> you have to update your xml. It seems you are porting from 3, and
> there are some changes in the dtd:
> as far as I can remember, java-type attribute never existed - but I
> might be wrong on that. anyway, it doesn"t exist any more in 4, and
> also the direction attribute was completlet removed.
> please consult the upgrading from 3.
> also there is in the wiki ( it think in wiki / tapestry 4 / howtos,
> but am not sure ) links to two libraries that make some of the tasks
> of converting xml from 3 to 4.
> good luck,
> Ron
>
>
> Daniel Kucharski wrote:
> > Greetings, appearantly my SAXparser has problems sometimes with
> > scanning my xml files.
> >
> >
> > For instance, i get this error:
> >
> > Unable to read context:/WEB-INF/SimpleInstanceViewer.jwc: Attribute
> > "java-type" must be declared for element type "parameter".
> >
> > This file contains:
> >
> > <?xml version="1.0" ?>
> > <!DOCTYPE component-specification PUBLIC
> > "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> > <component-specification allow-body="no"
> > allow-informal-parameters="no"
> > class="view.components.SimpleInstanceViewer">
> > <parameter java-type="java.lang.Object" name="instance"
direction="in"
> > required="yes"/>
> > <component id="elements" type="Foreach">
> > <inherited-binding name="source" parameter-name="source"/>
> > </component>
> > <component id="cells" type="Foreach">
> > <binding name="source" expression="components.elements.value"/>
> > </component>
> > </component-specification>
> >
> >
> > So the java-type actuallly does exists.
> >
> > Anyone a clue ?
> >
> >
> > Thx
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail:
> > tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
The Spindle guy. http://spindle.sf.net
Get help with Spindle:
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates: http://spindle.sf.net/updates
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Sax parser problems
Posted by Geoff Longman <gl...@gmail.com>.
I read the first post wrong.
drop all reference to 'java-type' (the 1.3 DTD) or 'type' if you have
any files using 3.0 DTD. Tapestry 4 discerns the type all by itself
now.
Also, T4 parameters no longer need to specify a direction (and they
can't) so drop the 'direction's too.
G
On 12/10/05, Ron Piterman <rp...@gmx.net> wrote:
> its not a problem of the sax parser, but rather of the document.
> you have to update your xml. It seems you are porting from 3, and there
> are some changes in the dtd:
> as far as I can remember, java-type attribute never existed - but I
> might be wrong on that. anyway, it doesn"t exist any more in 4, and also
> the direction attribute was completlet removed.
> please consult the upgrading from 3.
> also there is in the wiki ( it think in wiki / tapestry 4 / howtos, but
> am not sure ) links to two libraries that make some of the tasks of
> converting xml from 3 to 4.
> good luck,
> Ron
>
>
> Daniel Kucharski wrote:
> > Greetings, appearantly my SAXparser has problems sometimes with scanning my
> > xml files.
> >
> >
> > For instance, i get this error:
> >
> > Unable to read context:/WEB-INF/SimpleInstanceViewer.jwc: Attribute
> > "java-type" must be declared for element type "parameter".
> >
> > This file contains:
> >
> > <?xml version="1.0" ?>
> > <!DOCTYPE component-specification PUBLIC
> > "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> > <component-specification allow-body="no"
> > allow-informal-parameters="no"
> > class="view.components.SimpleInstanceViewer">
> > <parameter java-type="java.lang.Object" name="instance" direction="in"
> > required="yes"/>
> > <component id="elements" type="Foreach">
> > <inherited-binding name="source" parameter-name="source"/>
> > </component>
> > <component id="cells" type="Foreach">
> > <binding name="source" expression="components.elements.value"/>
> > </component>
> > </component-specification>
> >
> >
> > So the java-type actuallly does exists.
> >
> > Anyone a clue ?
> >
> >
> > Thx
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
The Spindle guy. http://spindle.sf.net
Get help with Spindle:
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates: http://spindle.sf.net/updates
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Sax parser problems
Posted by Ron Piterman <rp...@gmx.net>.
its not a problem of the sax parser, but rather of the document.
you have to update your xml. It seems you are porting from 3, and there
are some changes in the dtd:
as far as I can remember, java-type attribute never existed - but I
might be wrong on that. anyway, it doesn"t exist any more in 4, and also
the direction attribute was completlet removed.
please consult the upgrading from 3.
also there is in the wiki ( it think in wiki / tapestry 4 / howtos, but
am not sure ) links to two libraries that make some of the tasks of
converting xml from 3 to 4.
good luck,
Ron
Daniel Kucharski wrote:
> Greetings, appearantly my SAXparser has problems sometimes with scanning my
> xml files.
>
>
> For instance, i get this error:
>
> Unable to read context:/WEB-INF/SimpleInstanceViewer.jwc: Attribute
> "java-type" must be declared for element type "parameter".
>
> This file contains:
>
> <?xml version="1.0" ?>
> <!DOCTYPE component-specification PUBLIC
> "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> <component-specification allow-body="no"
> allow-informal-parameters="no"
> class="view.components.SimpleInstanceViewer">
> <parameter java-type="java.lang.Object" name="instance" direction="in"
> required="yes"/>
> <component id="elements" type="Foreach">
> <inherited-binding name="source" parameter-name="source"/>
> </component>
> <component id="cells" type="Foreach">
> <binding name="source" expression="components.elements.value"/>
> </component>
> </component-specification>
>
>
> So the java-type actuallly does exists.
>
> Anyone a clue ?
>
>
> Thx
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Sax parser problems
Posted by Geoff Longman <gl...@gmail.com>.
Don't know the cause of your problem but it looks like your parser is
not respecting the DOCTYPE declaration.' java-type' is from the 1.3
dtd - is that even shipped in 4.0?
Are you sure you are running 4.0? Don't have any old (pre 4) versions
of Tapestry in the classpath?
>From the 1.3 DTD:
<!ELEMENT parameter (description*)>
<!ATTLIST parameter
name CDATA #REQUIRED
java-type CDATA #IMPLIED
required %attribute-flag; "no"
property-name CDATA #IMPLIED
direction (in|form|custom) "custom"
>
>From the 3.0 DTD:
<!ELEMENT parameter (description?)>
<!ATTLIST parameter
name CDATA #REQUIRED
type CDATA #IMPLIED
required %attribute-flag; "no"
property-name CDATA #IMPLIED
default-value CDATA #IMPLIED
direction (in | form | custom | auto) "custom"
>
>From the 4.0 DTD:
<!ELEMENT parameter (description?)>
<!ATTLIST parameter
name CDATA #REQUIRED
required %attribute-flag; "no"
property CDATA #IMPLIED
default-value CDATA #IMPLIED
cache %attribute-flag; "yes"
aliases CDATA #IMPLIED
deprecated %attribute-flag; "no"
>
Geoff
On 12/10/05, Daniel Kucharski <Da...@vub.ac.be> wrote:
> Greetings, appearantly my SAXparser has problems sometimes with scanning my
> xml files.
>
>
> For instance, i get this error:
>
> Unable to read context:/WEB-INF/SimpleInstanceViewer.jwc: Attribute
> "java-type" must be declared for element type "parameter".
>
> This file contains:
>
> <?xml version="1.0" ?>
> <!DOCTYPE component-specification PUBLIC
> "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> <component-specification allow-body="no"
> allow-informal-parameters="no"
> class="view.components.SimpleInstanceViewer">
> <parameter java-type="java.lang.Object" name="instance" direction="in"
> required="yes"/>
> <component id="elements" type="Foreach">
> <inherited-binding name="source" parameter-name="source"/>
> </component>
> <component id="cells" type="Foreach">
> <binding name="source" expression="components.elements.value"/>
> </component>
> </component-specification>
>
>
> So the java-type actuallly does exists.
>
> Anyone a clue ?
>
>
> Thx
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
--
The Spindle guy. http://spindle.sf.net
Get help with Spindle:
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates: http://spindle.sf.net/updates
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org