On Thu, 2003-11-27 at 04:40, khote wrote: > I'm writing a tempate for myself to output an applicationcontext.xml file > for spring. > within the template: > <!DOCTYPE beans > PUBLIC "-//SPRING//DTD BEAN//EN" > "http://www.springframework.org/dtd/spring-beans.dtd"> > ....some stuff.... > <XDtClass:ifHasClassTag tagName="spring.session-factory" > paramName="lazy-init"> > lazy-init="<XDtClass:classTagValue tagName="spring.session-factory" > paramName="lazy-init"/>" > </XDtClass:ifHasClassTag> > ..... > > Is there a way I can access the default values (if any) specified in the > DTD?
According to the docs for classTagValue (http://xdoclet.sourceforge.net/templates/Class.html#classTagValue) there's an optional parameter "default" ("The default value is returned if parameter not specified by user for the tag.") so I guess you could try adding default="X" to your tag. It's not accessing the value *from* the DTD as such i.e. it doesn't read the DTD to obtain it, but it does give you a way to specify any defaults in your template without having to include explicit checks for <XDtClass:ifDoesntHaveClassTag> all over the place. Andrew. ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
