> [stuff about JBOSS_DTD_FILE_NAME_30 being in two places]
> > Good idea. Create a new namespace, say XDtXml and define a
dtdEntry() or
> > something like that there, this one with look back at
> > getActiveSubTask(), cast it to XmlSubTask and call a new
getDtdEntry()
> > method on it. That method can check current template file and
settings
> > (jboss version/etc) and return the correct dtd entry/publicid.
> 
> I think it's slightly easier than even that (I'm half way through it
at
> the moment) - JBossSubTask.execute() already does a setPublicId() and
> setDtdFileName() to the correct versions.  If I add a similar
> setSystemId(), I think it then only needs tags that insert the
> getPublicId() and getSystemId() output in the generated file (plus
> changing other XML template-based subtasks as necessary to act
similarly
> in execute()).

Agree.

> A quick question - if the tag gets called from a non-XML subtask,
should
> it return an empty string or throw an XDocletException?

Well, then you don't have access to the getSystemId()/etc methods so you
can't accomplish the intended job. So throw an exception. Btw, no one
will hopefully use it in a non-xml context!

> Also, one other thing I noticed while working on this - the various
> constants for the JBoss DTD's public IDs and filenames are all
declared
> private.  Might they ever be referenced from other classes, e.g. a
> customised descendant subtask? (at first I thought I'd need to from
the
> tag handler, but doing it as above it's not necessary)

Yup. I changed some constants to public before. But there may be some
other private ones. We can safely declare it private at first and then
just convert it to public when needed, but it's not a big deal to
declare it public, so declare it public :-)

Ara.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to