Saladin- You're right, as long as the parser that reads the mapping file isn't configured to validate, you don't need a namespace for the Castor portions of the mapping file. In my case I think I had configured the Castor parser via the castor.properties file, thus both the mapping file and the data file were validated, and therefore the mapping file had to have correct namespace declarations.
Stephen On 3/19/07, Saladin Sharif <[EMAIL PROTECTED]> wrote:
> I don't know as it is that much cleaner, but in the > mapping file you > can declare your namespace as the default and give > Castor a prefix. > That allows you to skip the prefixes in the bind-xml > name attributes > at least. So far I have not declared a namespace for castor in the mapping file. I assume that it is not a requirement since the code works fine without declaring the castor namespace. -Saladin --- Stephen Bash <[EMAIL PROTECTED]> wrote: > Saladin- > > Oops... Rereading your message I got a clearer > picture of what you're > asking... No, I don't think there is a more > straight forward way to > handle the ns-uri attribute vs. the bind-xml name > attribute. You > might try searching the mailing list archives for > ns-uri and see if > there has been a discussion about why this is so... > (I vaguely > remember having a conversation with someone about > it, and I don't > remember if it is supposed to be this way or it is a > left over that > should be changed...) > > Below is my original response because it may be of > help to someone > else in the future. (I thought the question was > "can I avoid having > to specify prefixes for all my bind-xml elements") > > I don't know as it is that much cleaner, but in the > mapping file you > can declare your namespace as the default and give > Castor a prefix. > That allows you to skip the prefixes in the bind-xml > name attributes > at least. I think you still need the ns-uri > attribute though... > > It really comes down to the fact that the mapping > file has two > different schema's interacting, so the namespaces > need to be > separated. You can choose to make one or the other > default and prefix > the other or vice versa. Honestly, the few times I > really had to have > careful validation of everything, I put prefixes on > both namespaces as > a double check for myself. > > HTH, > Stephen ********************************************************** * Saladin Sharif * e-mail: [EMAIL PROTECTED] * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs ********************************************************** ____________________________________________________________________________________ Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/ --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
--------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

