Jay Blanton

Greenhorn
+ Follow
since Jun 17, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jay Blanton

I have retrieving my Object instances from a class with a method called getProxy. That method adds InvocationHandlers to extract out logic like tracing logic. Inside my TracingInvocationHandler, I print a statement before a method is executed and one after. I am able to run this fine through some functionality, but other methods cause an OutOfMemoryError. Those methods may create massive size lists within them...would this cause a problem? Is the Proxy to slow in performance to use it to do this?




Thanks for your help,

-jay
19 years ago
Sorry...I meant DynaValidatorForm and DynaValidatorActionForm
20 years ago
Thank you very much for your fast reply...this is exactly what I was looking for and looks like we are utilizing the DynaFormActionValidator as opposed to the DynaFormValidator in this situation.

Thanks!!!
20 years ago
I have a tiles layout page with a form on it. The action of the form is dynamic because the page can be entered from multiple locations and so the form action changes based on those locations. Except the fact that the fields on the form are the same and so are the validation rules. It appears that Struts validation.xml requires form definitions based on the url patterns in struts-config.xml. Is this true? Can you define global field or form definitions that can be used in multiple field/form definitions? Because I have one form that is accessed and sent to different actions, I have to have a duplicate definition for validation for each possible action path.

Thanks!
20 years ago
http://www.perfectxml.com

This is also a really good reference link.

It has a collection of all the XML sample chapters out there. You don't even need a book if you put all these together. Great resource.
The biggest differences are DTDs allow the use of Entities, Schemas allow the use Namespaces. Schemas also allow you to create more defined data types to validate against. DTDs only allow the use of default data types, for validation. Schemas can inherit from other schemas. Schemas are also well-formed XML so you can parse them with SAX or DOM.
Did you translate this?

The answer is a and b. Red and blue.

The output looks like this:

This apply-templates says find any CCC element in the document.

It first finds

It looks for a template to match CCC with id='cd1'. It finds the following:

So the first color is blue. Then it finds:

It looks for a template to match CCC with id='cd2'. It finds the following:

Both of these templates match. But according to the XSLT Reference (by Michael Kay page 315)..."If there are several matching templates left, and they all have the same import precedence and priority, the XSLT processor can either choose the one that occurs last in the stylesheet, or report an error."

So the XSLT picks the:

Because it is last in the XSLT, so the next color is red. If you switch the order of

The colors will change.

Then it finally finds:

It looks for a template to match CCC with id='cd3'. It finds the following:

So the color is blue again.

Hope this helps.

- Jay
[ June 17, 2004: Message edited by: Jay Blanton ]