A wise old hermit known only as Ara Abrahamian <[EMAIL PROTECTED]> once 
said:

[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()).

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

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)


Andrew.

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

Reply via email to