You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <Jo...@SmartPrice.com> on 2003/09/08 15:55:52 UTC

RE: Adding HTML to

BTW, thanks for the tip. We have incorporated into the code and it
works nice and cleanly.

J

-----Original Message-----
From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
Sent: Monday, June 30, 2003 10:45 AM
To: Tapestry users
Subject: RE: Adding HTML to <head>


Oh, sorry. This is a 3.0 code.

shellBlock@Block means a component of type Block with id of 'shellBlock'

Here is the 2.3 equivalent:

component.html
--------------

<span jwcid="shell"/>

<span jwcid="shellBlock">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	....
</span>


component.jwc
-------------

    <component id="shell" type="Shell">
        <static-binding name="title">...</static-binding>
        <binding name="delegate" expression='new
BlockRenderer(getComponent("shellBlock"))'/>
    </component>

    <component id="shellBlock" type="Block"/>


I hope this helps,
-mb


-----Original Message-----
From: Joel Trunick [mailto:Joel@SmartPrice.com]
Sent: Monday, June 30, 2003 6:31 PM
To: 'Tapestry users'
Subject: RE: Adding HTML to <head>



I guess I'm not familiar with that technique. Does this translate to 2.3?
I'm not sure what the '@' in "shellBlock@Block" does.

Joel

-----Original Message-----
From: Mind Bridge [mailto:mindbridgeweb@yahoo.com]
Sent: Monday, June 30, 2003 10:27 AM
To: Tapestry users
Subject: RE: Adding HTML to <head>


Hi Joel,

Here is how I typically do it:


<span jwcid="@Shell" title="..." delegate='ognl:new
BlockRenderer(getComponent("shellBlock"))'/>

<span jwcid="shellBlock@Block">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	....
</span>


I suppose a 'blockDelegate' parameter could possibly be added to do the
above slightly easier.

Best regards
-mb


-----Original Message-----
From: Joel Trunick [mailto:Joel@SmartPrice.com]
Sent: Monday, June 30, 2003 6:01 PM
To: 'Tapestry users'
Subject: RE: Adding HTML to <head>



It would be nice if the Shell component could take some informal parameters
somehow. For instance, putting in meta keywords and description is ugly in
Java code. It seems there should be a way to specify those, without
resorting to code.

Joel



-----Original Message-----
From: Howard M. Lewis Ship [mailto:hlship@attbi.com]
Sent: Friday, June 27, 2003 8:38 AM
To: 'Tapestry users'
Subject: RE: Adding HTML to <head>


The Shell component has a delegate parameter; this is an object
(potentially, an inner class) that
implements the IRender interface.  A common use of this is to write <meta>
tags.

The Shell component accepts stylesheet (a single asset) or stylesheets (list
or array of assets)
parameters.

In terms of JavaScript, that's actually handled by the Body component
(<script> should generally go
just inside the <body> tag).  In generaly, JavaScript is Tapestry is
assembled dynamically using the
Script component and the script specification subsystem.  You can also
include references to
JavaScript libraries (.js files).  Again, the Body and Script components are
the way to go.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Jason Vasquez [mailto:jason@obiwan.homelinux.org]
> Sent: Thursday, June 26, 2003 4:34 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Adding HTML to <head>
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all, I'm just getting started with Tapestry, and I've got a quick
> question.
>
> I'm using the @Shell JWC, but I need to include additional
> HTML elements
> to the <head> tag.  (e.g. specify add'l stylesheets,
> javascript, etc.) How
> can I accomplish that?
>
> Thanks,
> jason
>
> - --
> - -------------------------------------------------------------------
> |                              |                                  |
> | Jason Vasquez                | When their numbers dwindled from |
> | jason@obiwan.homelinux.org   | 50 to 8, the other dwarves began |
> | http://obiwan.homelinux.org  | to suspect Hungry.               |
> |                              |                                  |
> |------------------------------------------------------------------
> | Public Key: http://obiwan.homelinux.org/~jason/pubkey.txt       |
> - -------------------------------------------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQE++1jIY6zA1HI6auYRAvQHAJ9suM4WwCXP4PDKLtL47NE4BXpj9wCgpmSf
> 5yrVwVOCQ9Dknok8mvsWpmQ=
> =uUc2
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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: WIBNI -- xml validation at build time

Posted by Glen Stampoultzis <gs...@iinet.net.au>.
At 02:54 PM 13/11/2003, you wrote:
>On Wednesday, November 12, 2003, at 10:22  PM, Kevin C. Dorff wrote:
>>The .page, .jwc, and .application are all xml files with dtd's listed at 
>>top. You just just run xml validation on them (probably there is an ant 
>>task somewhere that will do this, dunno).
>
>Well, sure.... <xmlvalidate>.
>
>But, that is only a partial part of what I think was meant by 
>"validation".  It would be handy to have .html files and their jwcid's 
>matched up against the .page file, for example, to make sure there were no 
>jwcid's missing from the .page file.  I'm sure that Spindle does far more 
>than that even (although I'm an IDEA man myself).
>
>It would be great to see more build-time checking of the pieces though.
>
>         Erik

Like an ant task.  That _would_ be nice.




Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/

Re: WIBNI -- xml validation at build time

Posted by Geoff Longman <gl...@intelligentworks.com>.
http://data.intelligentworks.com/AntTask.pdf

Installment 1 of how to build an Ant Task to mimic the Spindle project
builder.

Actually, it not a how-to as I have no clue how to make ant tasks. Its more
an overview of the problem space and some things I did to make things work.

Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: WIBNI -- xml validation at build time

Posted by Geoff Longman <gl...@intelligentworks.com>.
I'll try and add a page to the Tapestry wiki describing what goes on this
weekend. Will post a note here when I have something.

Geoff
----- Original Message -----
From: "J. Joseph Benavidez" <jj...@redhat.com>
To: <ta...@jakarta.apache.org>
Sent: Saturday, November 15, 2003 3:13 AM
Subject: Re: WIBNI -- xml validation at build time


> Hi Geoff,
>
> As we're about to start a project using Tapestry, I'd be interested in
> investigating such a beast...
>
> I haven't any experience with eclipse code... can you point to some key
> classes to help me walk through the spindle code, and maybe discuss the
> eclipse code upon which spindle relies?
>
> Thanks,
>
> j.joseph
>
>
> On Thu, 2003-11-13 at 04:44, Geoff Longman wrote:
> > It would be tough to adapt the code Spindle uses to do this to an ant
task
> > because it depends on so much provided by Eclipse. One would have to
> > reproduce those services to a great degree.
> >
> > As past efforts have shown, Spindle is a never ending job. I don't think
> > I'll have time to spearhead such a project to build an ant task.
Although,
> > I'm happy to relate my experiences to anyone who might want to try it.
> >
> > Geoff
> >
> > P.S. in case there's anyone out there that doesn't know this yet,
Spindle
> > binaries are available.
> > ----- Original Message -----
> > From: "J. Joseph Benavidez" <jj...@redhat.com>
> > To: <ta...@jakarta.apache.org>
> > Sent: Thursday, November 13, 2003 6:03 AM
> > Subject: Re: WIBNI -- xml validation at build time
> >
> >
> > > Erik Hatcher wrote:
> > > > On Wednesday, November 12, 2003, at 10:22  PM, Kevin C. Dorff wrote:
> > > >
> > > >> The .page, .jwc, and .application are all xml files with dtd's
listed
> > > >> at top. You just just run xml validation on them (probably there is
an
> > > >> ant task somewhere that will do this, dunno).
> > > >
> > > >
> > > > Well, sure.... <xmlvalidate>.
> > > >
> > > > But, that is only a partial part of what I think was meant by
> > > > "validation".  It would be handy to have .html files and their
jwcid's
> > > > matched up against the .page file, for example, to make sure there
were
> > > > no jwcid's missing from the .page file.  I'm sure that Spindle does
far
> > > > more than that even (although I'm an IDEA man myself).
> > > >
> > > > It would be great to see more build-time checking of the pieces
though.
> > > >
> > > >     Erik
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > Right... I should have been clearer in my original posting. By
> > > "validation", I was referring to notes by Geoff Longman describing
> > > Spindle 3.0 in article
> > > http://article.gmane.org/gmane.comp.java.tapestry.user/4775, which
I'll
> > > reproduce here. Having an ant task or maven goal that does the
following
> > > would be very useful...
> > >
> > > ------------
> > > ...
> > > So, what's that [Spindle] good for?
> > >
> > > During the build, the builder finds many of the little niggly errors
that
> > > are not caught by the old version of Spindle. Malformed OGNL,
unresolvable
> > > classnames, unresolvable component names, are but a few of the errors
> > > caught. There are many more.
> > > Problems detected by the builder are marked in the Eclipse way. So,
you
> > get
> > > the error markers in the Gutters of your editor and the problems show
up
> > as
> > > tasks in the Tasks View. How many time have you started a Tapestry
runtime
> > > only to have it tank 'cuz you mistyped an OGNL expression? Spindle
will
> > > catch it ahead of time, saving you time.
> > >
> > > Spindle processes:
> > >
> > > web.xml
> > > .application files
> > > .jwc file
> > > .page files
> > > .html files (Templates!)
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
>
> ---------------------------------------------------------------------
> 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: WIBNI -- xml validation at build time

Posted by "J. Joseph Benavidez" <jj...@redhat.com>.
Hi Geoff,

As we're about to start a project using Tapestry, I'd be interested in
investigating such a beast...

I haven't any experience with eclipse code... can you point to some key
classes to help me walk through the spindle code, and maybe discuss the
eclipse code upon which spindle relies?

Thanks,

j.joseph


On Thu, 2003-11-13 at 04:44, Geoff Longman wrote:
> It would be tough to adapt the code Spindle uses to do this to an ant task
> because it depends on so much provided by Eclipse. One would have to
> reproduce those services to a great degree.
> 
> As past efforts have shown, Spindle is a never ending job. I don't think
> I'll have time to spearhead such a project to build an ant task. Although,
> I'm happy to relate my experiences to anyone who might want to try it.
> 
> Geoff
> 
> P.S. in case there's anyone out there that doesn't know this yet, Spindle
> binaries are available.
> ----- Original Message -----
> From: "J. Joseph Benavidez" <jj...@redhat.com>
> To: <ta...@jakarta.apache.org>
> Sent: Thursday, November 13, 2003 6:03 AM
> Subject: Re: WIBNI -- xml validation at build time
> 
> 
> > Erik Hatcher wrote:
> > > On Wednesday, November 12, 2003, at 10:22  PM, Kevin C. Dorff wrote:
> > >
> > >> The .page, .jwc, and .application are all xml files with dtd's listed
> > >> at top. You just just run xml validation on them (probably there is an
> > >> ant task somewhere that will do this, dunno).
> > >
> > >
> > > Well, sure.... <xmlvalidate>.
> > >
> > > But, that is only a partial part of what I think was meant by
> > > "validation".  It would be handy to have .html files and their jwcid's
> > > matched up against the .page file, for example, to make sure there were
> > > no jwcid's missing from the .page file.  I'm sure that Spindle does far
> > > more than that even (although I'm an IDEA man myself).
> > >
> > > It would be great to see more build-time checking of the pieces though.
> > >
> > >     Erik
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> > Right... I should have been clearer in my original posting. By
> > "validation", I was referring to notes by Geoff Longman describing
> > Spindle 3.0 in article
> > http://article.gmane.org/gmane.comp.java.tapestry.user/4775, which I'll
> > reproduce here. Having an ant task or maven goal that does the following
> > would be very useful...
> >
> > ------------
> > ...
> > So, what's that [Spindle] good for?
> >
> > During the build, the builder finds many of the little niggly errors that
> > are not caught by the old version of Spindle. Malformed OGNL, unresolvable
> > classnames, unresolvable component names, are but a few of the errors
> > caught. There are many more.
> > Problems detected by the builder are marked in the Eclipse way. So, you
> get
> > the error markers in the Gutters of your editor and the problems show up
> as
> > tasks in the Tasks View. How many time have you started a Tapestry runtime
> > only to have it tank 'cuz you mistyped an OGNL expression? Spindle will
> > catch it ahead of time, saving you time.
> >
> > Spindle processes:
> >
> > web.xml
> > .application files
> > .jwc file
> > .page files
> > .html files (Templates!)
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: WIBNI -- xml validation at build time

Posted by Geoff Longman <gl...@intelligentworks.com>.
It would be tough to adapt the code Spindle uses to do this to an ant task
because it depends on so much provided by Eclipse. One would have to
reproduce those services to a great degree.

As past efforts have shown, Spindle is a never ending job. I don't think
I'll have time to spearhead such a project to build an ant task. Although,
I'm happy to relate my experiences to anyone who might want to try it.

Geoff

P.S. in case there's anyone out there that doesn't know this yet, Spindle
binaries are available.
----- Original Message -----
From: "J. Joseph Benavidez" <jj...@redhat.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, November 13, 2003 6:03 AM
Subject: Re: WIBNI -- xml validation at build time


> Erik Hatcher wrote:
> > On Wednesday, November 12, 2003, at 10:22  PM, Kevin C. Dorff wrote:
> >
> >> The .page, .jwc, and .application are all xml files with dtd's listed
> >> at top. You just just run xml validation on them (probably there is an
> >> ant task somewhere that will do this, dunno).
> >
> >
> > Well, sure.... <xmlvalidate>.
> >
> > But, that is only a partial part of what I think was meant by
> > "validation".  It would be handy to have .html files and their jwcid's
> > matched up against the .page file, for example, to make sure there were
> > no jwcid's missing from the .page file.  I'm sure that Spindle does far
> > more than that even (although I'm an IDEA man myself).
> >
> > It would be great to see more build-time checking of the pieces though.
> >
> >     Erik
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> Right... I should have been clearer in my original posting. By
> "validation", I was referring to notes by Geoff Longman describing
> Spindle 3.0 in article
> http://article.gmane.org/gmane.comp.java.tapestry.user/4775, which I'll
> reproduce here. Having an ant task or maven goal that does the following
> would be very useful...
>
> ------------
> ...
> So, what's that [Spindle] good for?
>
> During the build, the builder finds many of the little niggly errors that
> are not caught by the old version of Spindle. Malformed OGNL, unresolvable
> classnames, unresolvable component names, are but a few of the errors
> caught. There are many more.
> Problems detected by the builder are marked in the Eclipse way. So, you
get
> the error markers in the Gutters of your editor and the problems show up
as
> tasks in the Tasks View. How many time have you started a Tapestry runtime
> only to have it tank 'cuz you mistyped an OGNL expression? Spindle will
> catch it ahead of time, saving you time.
>
> Spindle processes:
>
> web.xml
> .application files
> .jwc file
> .page files
> .html files (Templates!)
>
>
>
> ---------------------------------------------------------------------
> 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: WIBNI -- xml validation at build time

Posted by "J. Joseph Benavidez" <jj...@redhat.com>.
Erik Hatcher wrote:
> On Wednesday, November 12, 2003, at 10:22  PM, Kevin C. Dorff wrote:
> 
>> The .page, .jwc, and .application are all xml files with dtd's listed 
>> at top. You just just run xml validation on them (probably there is an 
>> ant task somewhere that will do this, dunno).
> 
> 
> Well, sure.... <xmlvalidate>.
> 
> But, that is only a partial part of what I think was meant by 
> "validation".  It would be handy to have .html files and their jwcid's 
> matched up against the .page file, for example, to make sure there were 
> no jwcid's missing from the .page file.  I'm sure that Spindle does far 
> more than that even (although I'm an IDEA man myself).
> 
> It would be great to see more build-time checking of the pieces though.
> 
>     Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 

Right... I should have been clearer in my original posting. By 
"validation", I was referring to notes by Geoff Longman describing 
Spindle 3.0 in article 
http://article.gmane.org/gmane.comp.java.tapestry.user/4775, which I'll 
reproduce here. Having an ant task or maven goal that does the following 
would be very useful...

------------
...
So, what's that [Spindle] good for?

During the build, the builder finds many of the little niggly errors that
are not caught by the old version of Spindle. Malformed OGNL, unresolvable
classnames, unresolvable component names, are but a few of the errors
caught. There are many more.
Problems detected by the builder are marked in the Eclipse way. So, you get
the error markers in the Gutters of your editor and the problems show up as
tasks in the Tasks View. How many time have you started a Tapestry runtime
only to have it tank 'cuz you mistyped an OGNL expression? Spindle will
catch it ahead of time, saving you time.

Spindle processes:

web.xml
.application files
.jwc file
.page files
.html files (Templates!)



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: WIBNI -- xml validation at build time

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Wednesday, November 12, 2003, at 10:22  PM, Kevin C. Dorff wrote:
> The .page, .jwc, and .application are all xml files with dtd's listed 
> at top. You just just run xml validation on them (probably there is an 
> ant task somewhere that will do this, dunno).

Well, sure.... <xmlvalidate>.

But, that is only a partial part of what I think was meant by 
"validation".  It would be handy to have .html files and their jwcid's 
matched up against the .page file, for example, to make sure there were 
no jwcid's missing from the .page file.  I'm sure that Spindle does far 
more than that even (although I'm an IDEA man myself).

It would be great to see more build-time checking of the pieces though.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: WIBNI -- xml validation at build time

Posted by "Kevin C. Dorff" <kd...@dorffweb.com>.
The .page, .jwc, and .application are all xml files with dtd's listed at 
top. You just just run xml validation on them (probably there is an ant 
task somewhere that will do this, dunno).

Kevin

J. Joseph Benavidez wrote:

> Still, it would be great to have a process that goes through all the 
> pages of a tapestry application specification and validates all the 
> pages... something that could be written as an ant target or maven 
> goal would be great so we can integrate it into our build/continuous 
> integration process...
>
> Would it be possible to break out some of Spindle's checking logic 
> into a standalone program?
>
> j.joseph
>
>
> Harish Krishnaswamy wrote:
>
>> Spindle - the eclipse plug-in for developing Tapestry applications! 
>> That's exactly what Spindle does and of course a lot more!! Check out 
>> spindle.sourceforge.net, it is still under development but the stuff 
>> that you are talking about is done. Spindle is still not available in 
>> binary format, you will have to download the source from cvs and 
>> build it. But very clear instructions are available in the email 
>> below, taken from the Spindle list.
>>
>> <----------------msg from spindle list-------------------->
>>
>> Have the first cut of an editor for templates.
>>
>> However, it depends on the solareclipse plugin from sourceforge. I 
>> checked
>> out their code
>> into eclipse so I expect that anybody who wants to try it out will 
>> also need
>> to.
>>
>> pserver:anonymous@cvs.sourceforge.net:/cvsroot/solareclipse
>>
>> the projects you need to check out are:
>>
>> net.sf.solareclipse.ui
>> net.sf.solareclipse.xml.ui
>>
>> as an ancient reminder for anybody whos wondering how to build/run 
>> spindle:
>>
>> http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/23
>>
>> and
>>
>> http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/24
>>
>> (The following message no longer applies)
>>
>> http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/25
>>
>> Geoffrey Longman
>> Intelligent Works Inc.
>>
>> <----------------msg from spindle list-------------------->
>>
>> -Harish
>>
>> Bryan Lewis wrote:
>>
>>> One of the nice things about developing in Java and Tapestry is the 
>>> good error
>>> checking at build time, or at worst, sometimes at deploy time.  
>>> (Maybe it's
>>> only me after three years of cleaning up WebObjects code that was 
>>> written in
>>> nasty old interpreted WebScript and with lots of key-value coding.)  
>>> However,
>>> it is still easy to get errors that don't pop up until you enter a 
>>> particular
>>> page at run-time.
>>>
>>> The obvious example is a syntax error in an xml specification file.  
>>> If I
>>> accidentally omit the closing slash, as in:
>>>
>>>    <static-binding name="title">This is a title.<static-binding>
>>>
>>> I don't find out about it until I enter that page at run-time.  Yes, 
>>> I know,
>>> that's what unit testing is for, but still... I thought it would be 
>>> helpful to
>>> do a little validation on the xml files at build time.
>>>
>>> I tried the Sun Multi-Schema Validator (MSV) because that was the 
>>> first one I
>>> googled... but it seemed like huge overkill and I gave up trying to 
>>> make sense
>>> of it.
>>>
>>> Then I found Ant's XMLValidate task, which works pretty well for the 
>>> tapestry
>>> xml files.  It's easy to use and does catch the example above.
>>>
>>> <target name="xmlvalidate">
>>>    <xmlvalidate lenient="no" warn="yes" failonerror="no">
>>>        <fileset dir="src/${ant.project.name}" 
>>> includes="**/*.page,**/*.jwc"/>
>>>        <fileset dir="." includes="web/conf/*.application"/>
>>>    </xmlvalidate>
>>> </target>
>>>
>>> Notice that I apply it to the tapestry files (page, jwc, 
>>> application) but not
>>> to html templates.  When I tried it on those I got a lot of errors I 
>>> don't
>>> really care about like:
>>>
>>>    The element type "br" must be terminated...
>>>    The entity "nbsp" was referenced, but not declared.
>>>
>>> Question 1:  Are those unavoidable because html is so loose?  Maybe 
>>> I should
>>> add a DTD
>>> header line to all my html files?  tapestry will sometimes give a 
>>> run-time
>>> error about such things as mismatched <span> tags.
>>>
>>> (It also didn't work on my jboss-related xmls (like ejb-jar and 
>>> jboss.xml).  I
>>> got bogus errors like "The content of element type "entity" must 
>>> match...".  I
>>> call them bogus because they don't interfere with operation, and I 
>>> can't make
>>> sense of them by looking at the jboss DTD's.  They don't worry me 
>>> too much,
>>> though... I'm not sure the JBoss DTDs are up to date, and I rarely 
>>> change these
>>> files anyway, and JBoss does catch some of them at deploy-time.)
>>>
>>> Question 2:  Has anyone else tried something like this?
>>>
>>> Thanks,
>>> Bryan Lewis
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> ---------------------------------------------------------------------
> 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: WIBNI -- xml validation at build time

Posted by "J. Joseph Benavidez" <jj...@redhat.com>.
Still, it would be great to have a process that goes through all the 
pages of a tapestry application specification and validates all the 
pages... something that could be written as an ant target or maven goal 
would be great so we can integrate it into our build/continuous 
integration process...

Would it be possible to break out some of Spindle's checking logic into 
a standalone program?

j.joseph


Harish Krishnaswamy wrote:
> Spindle - the eclipse plug-in for developing Tapestry applications! 
> That's exactly what Spindle does and of course a lot more!! Check out 
> spindle.sourceforge.net, it is still under development but the stuff 
> that you are talking about is done. Spindle is still not available in 
> binary format, you will have to download the source from cvs and build 
> it. But very clear instructions are available in the email below, taken 
> from the Spindle list.
> 
> <----------------msg from spindle list-------------------->
> 
> Have the first cut of an editor for templates.
> 
> However, it depends on the solareclipse plugin from sourceforge. I checked
> out their code
> into eclipse so I expect that anybody who wants to try it out will also 
> need
> to.
> 
> pserver:anonymous@cvs.sourceforge.net:/cvsroot/solareclipse
> 
> the projects you need to check out are:
> 
> net.sf.solareclipse.ui
> net.sf.solareclipse.xml.ui
> 
> as an ancient reminder for anybody whos wondering how to build/run spindle:
> 
> http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/23
> 
> and
> 
> http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/24
> 
> (The following message no longer applies)
> 
> http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/25
> 
> Geoffrey Longman
> Intelligent Works Inc.
> 
> <----------------msg from spindle list-------------------->
> 
> -Harish
> 
> Bryan Lewis wrote:
> 
>> One of the nice things about developing in Java and Tapestry is the 
>> good error
>> checking at build time, or at worst, sometimes at deploy time.  (Maybe 
>> it's
>> only me after three years of cleaning up WebObjects code that was 
>> written in
>> nasty old interpreted WebScript and with lots of key-value coding.)  
>> However,
>> it is still easy to get errors that don't pop up until you enter a 
>> particular
>> page at run-time.
>>
>> The obvious example is a syntax error in an xml specification file.  If I
>> accidentally omit the closing slash, as in:
>>
>>    <static-binding name="title">This is a title.<static-binding>
>>
>> I don't find out about it until I enter that page at run-time.  Yes, I 
>> know,
>> that's what unit testing is for, but still... I thought it would be 
>> helpful to
>> do a little validation on the xml files at build time.
>>
>> I tried the Sun Multi-Schema Validator (MSV) because that was the 
>> first one I
>> googled... but it seemed like huge overkill and I gave up trying to 
>> make sense
>> of it.
>>
>> Then I found Ant's XMLValidate task, which works pretty well for the 
>> tapestry
>> xml files.  It's easy to use and does catch the example above.
>>
>> <target name="xmlvalidate">
>>    <xmlvalidate lenient="no" warn="yes" failonerror="no">
>>        <fileset dir="src/${ant.project.name}" 
>> includes="**/*.page,**/*.jwc"/>
>>        <fileset dir="." includes="web/conf/*.application"/>
>>    </xmlvalidate>
>> </target>
>>
>> Notice that I apply it to the tapestry files (page, jwc, application) 
>> but not
>> to html templates.  When I tried it on those I got a lot of errors I 
>> don't
>> really care about like:
>>
>>    The element type "br" must be terminated...
>>    The entity "nbsp" was referenced, but not declared.
>>
>> Question 1:  Are those unavoidable because html is so loose?  Maybe I 
>> should
>> add a DTD
>> header line to all my html files?  tapestry will sometimes give a 
>> run-time
>> error about such things as mismatched <span> tags.
>>
>> (It also didn't work on my jboss-related xmls (like ejb-jar and 
>> jboss.xml).  I
>> got bogus errors like "The content of element type "entity" must 
>> match...".  I
>> call them bogus because they don't interfere with operation, and I 
>> can't make
>> sense of them by looking at the jboss DTD's.  They don't worry me too 
>> much,
>> though... I'm not sure the JBoss DTDs are up to date, and I rarely 
>> change these
>> files anyway, and JBoss does catch some of them at deploy-time.)
>>
>> Question 2:  Has anyone else tried something like this?
>>
>> Thanks,
>> Bryan Lewis
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: WIBNI -- xml validation at build time

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Spindle - the eclipse plug-in for developing Tapestry applications! 
That's exactly what Spindle does and of course a lot more!! Check out 
spindle.sourceforge.net, it is still under development but the stuff 
that you are talking about is done. Spindle is still not available in 
binary format, you will have to download the source from cvs and build 
it. But very clear instructions are available in the email below, taken 
from the Spindle list.

<----------------msg from spindle list-------------------->

Have the first cut of an editor for templates.

However, it depends on the solareclipse plugin from sourceforge. I checked
out their code
into eclipse so I expect that anybody who wants to try it out will also need
to.

pserver:anonymous@cvs.sourceforge.net:/cvsroot/solareclipse

the projects you need to check out are:

net.sf.solareclipse.ui
net.sf.solareclipse.xml.ui

as an ancient reminder for anybody whos wondering how to build/run spindle:

http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/23

and

http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/24

(The following message no longer applies)

http://article.gmane.org/gmane.comp.ide.eclipse.spindle.devel/25

Geoffrey Longman
Intelligent Works Inc.

<----------------msg from spindle list-------------------->

-Harish

Bryan Lewis wrote:

>One of the nice things about developing in Java and Tapestry is the good error
>checking at build time, or at worst, sometimes at deploy time.  (Maybe it's
>only me after three years of cleaning up WebObjects code that was written in
>nasty old interpreted WebScript and with lots of key-value coding.)  However,
>it is still easy to get errors that don't pop up until you enter a particular
>page at run-time.
>
>The obvious example is a syntax error in an xml specification file.  If I
>accidentally omit the closing slash, as in:
>
>    <static-binding name="title">This is a title.<static-binding>
>
>I don't find out about it until I enter that page at run-time.  Yes, I know,
>that's what unit testing is for, but still... I thought it would be helpful to
>do a little validation on the xml files at build time.
>
>I tried the Sun Multi-Schema Validator (MSV) because that was the first one I
>googled... but it seemed like huge overkill and I gave up trying to make sense
>of it.
>
>Then I found Ant's XMLValidate task, which works pretty well for the tapestry
>xml files.  It's easy to use and does catch the example above.
>
><target name="xmlvalidate">
>    <xmlvalidate lenient="no" warn="yes" failonerror="no">
>        <fileset dir="src/${ant.project.name}" includes="**/*.page,**/*.jwc"/>
>        <fileset dir="." includes="web/conf/*.application"/>
>    </xmlvalidate>
></target>
>
>Notice that I apply it to the tapestry files (page, jwc, application) but not
>to html templates.  When I tried it on those I got a lot of errors I don't
>really care about like:
>
>    The element type "br" must be terminated...
>    The entity "nbsp" was referenced, but not declared.
>
>Question 1:  Are those unavoidable because html is so loose?  Maybe I should
>add a DTD
>header line to all my html files?  tapestry will sometimes give a run-time
>error about such things as mismatched <span> tags.
>
>(It also didn't work on my jboss-related xmls (like ejb-jar and jboss.xml).  I
>got bogus errors like "The content of element type "entity" must match...".  I
>call them bogus because they don't interfere with operation, and I can't make
>sense of them by looking at the jboss DTD's.  They don't worry me too much,
>though... I'm not sure the JBoss DTDs are up to date, and I rarely change these
>files anyway, and JBoss does catch some of them at deploy-time.)
>
>Question 2:  Has anyone else tried something like this?
>
>Thanks,
>Bryan Lewis
>
>
>
>---------------------------------------------------------------------
>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: WIBNI -- xml validation at build time

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I recommend using Ant's <xmlvalidate> task to validate all deployed XML 
files during the build process.  Its a real time (and hair) saver!

	Erik


On Monday, September 8, 2003, at 11:32  AM, Bryan Lewis wrote:

> One of the nice things about developing in Java and Tapestry is the 
> good error
> checking at build time, or at worst, sometimes at deploy time.  (Maybe 
> it's
> only me after three years of cleaning up WebObjects code that was 
> written in
> nasty old interpreted WebScript and with lots of key-value coding.)  
> However,
> it is still easy to get errors that don't pop up until you enter a 
> particular
> page at run-time.
>
> The obvious example is a syntax error in an xml specification file.  
> If I
> accidentally omit the closing slash, as in:
>
>     <static-binding name="title">This is a title.<static-binding>
>
> I don't find out about it until I enter that page at run-time.  Yes, I 
> know,
> that's what unit testing is for, but still... I thought it would be 
> helpful to
> do a little validation on the xml files at build time.
>
> I tried the Sun Multi-Schema Validator (MSV) because that was the 
> first one I
> googled... but it seemed like huge overkill and I gave up trying to 
> make sense
> of it.
>
> Then I found Ant's XMLValidate task, which works pretty well for the 
> tapestry
> xml files.  It's easy to use and does catch the example above.
>
> <target name="xmlvalidate">
>     <xmlvalidate lenient="no" warn="yes" failonerror="no">
>         <fileset dir="src/${ant.project.name}" 
> includes="**/*.page,**/*.jwc"/>
>         <fileset dir="." includes="web/conf/*.application"/>
>     </xmlvalidate>
> </target>
>
> Notice that I apply it to the tapestry files (page, jwc, application) 
> but not
> to html templates.  When I tried it on those I got a lot of errors I 
> don't
> really care about like:
>
>     The element type "br" must be terminated...
>     The entity "nbsp" was referenced, but not declared.
>
> Question 1:  Are those unavoidable because html is so loose?  Maybe I 
> should
> add a DTD
> header line to all my html files?  tapestry will sometimes give a 
> run-time
> error about such things as mismatched <span> tags.
>
> (It also didn't work on my jboss-related xmls (like ejb-jar and 
> jboss.xml).  I
> got bogus errors like "The content of element type "entity" must 
> match...".  I
> call them bogus because they don't interfere with operation, and I 
> can't make
> sense of them by looking at the jboss DTD's.  They don't worry me too 
> much,
> though... I'm not sure the JBoss DTDs are up to date, and I rarely 
> change these
> files anyway, and JBoss does catch some of them at deploy-time.)
>
> Question 2:  Has anyone else tried something like this?
>
> Thanks,
> Bryan Lewis
>
>
>
> ---------------------------------------------------------------------
> 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


WIBNI -- xml validation at build time

Posted by Bryan Lewis <br...@maine.rr.com>.
One of the nice things about developing in Java and Tapestry is the good error
checking at build time, or at worst, sometimes at deploy time.  (Maybe it's
only me after three years of cleaning up WebObjects code that was written in
nasty old interpreted WebScript and with lots of key-value coding.)  However,
it is still easy to get errors that don't pop up until you enter a particular
page at run-time.

The obvious example is a syntax error in an xml specification file.  If I
accidentally omit the closing slash, as in:

    <static-binding name="title">This is a title.<static-binding>

I don't find out about it until I enter that page at run-time.  Yes, I know,
that's what unit testing is for, but still... I thought it would be helpful to
do a little validation on the xml files at build time.

I tried the Sun Multi-Schema Validator (MSV) because that was the first one I
googled... but it seemed like huge overkill and I gave up trying to make sense
of it.

Then I found Ant's XMLValidate task, which works pretty well for the tapestry
xml files.  It's easy to use and does catch the example above.

<target name="xmlvalidate">
    <xmlvalidate lenient="no" warn="yes" failonerror="no">
        <fileset dir="src/${ant.project.name}" includes="**/*.page,**/*.jwc"/>
        <fileset dir="." includes="web/conf/*.application"/>
    </xmlvalidate>
</target>

Notice that I apply it to the tapestry files (page, jwc, application) but not
to html templates.  When I tried it on those I got a lot of errors I don't
really care about like:

    The element type "br" must be terminated...
    The entity "nbsp" was referenced, but not declared.

Question 1:  Are those unavoidable because html is so loose?  Maybe I should
add a DTD
header line to all my html files?  tapestry will sometimes give a run-time
error about such things as mismatched <span> tags.

(It also didn't work on my jboss-related xmls (like ejb-jar and jboss.xml).  I
got bogus errors like "The content of element type "entity" must match...".  I
call them bogus because they don't interfere with operation, and I can't make
sense of them by looking at the jboss DTD's.  They don't worry me too much,
though... I'm not sure the JBoss DTDs are up to date, and I rarely change these
files anyway, and JBoss does catch some of them at deploy-time.)

Question 2:  Has anyone else tried something like this?

Thanks,
Bryan Lewis



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org