The namespace prefix is only required on the elements from your DTD that are to be inserted. Try setting the "element" attribute of the "InsertAutoWithin" tag to just "indexterm".
Brandon Ibach Developer, Single-Sourcing Solutions, Inc.
On Tue, Aug 11, 2009 at 10:34 AM, samah abu-mahmeed<firstname.lastname@example.org> wrote: > Hi all, > > I'm trying to use <insertautowithin> in the dcf to force inserting child > elements when a container element is inserted but I couldn't get it to work. > The container element is "indexterm" and the child elements are "primary, > secondary & tertiary" I used the DTD as the namespace. Any idea of what I > need to do? > > > > <contexttransformations> > <insertautowithin element="evidbook:indexterm"<br"/>> xmlns:evidbook="evidbook.dtd">> > <evidbook:primary></evidbook:primary> > <evidbook:secondary></evidbook:secondary> > <evidbook:tertiary></evidbook:tertiary> > </insertautowithin> > </contexttransformations> > > > > > > Thanks, > > > > Samah > > ---------- >
Does your DTD actually incorporate a namespace, at all? The examples included with Editor, such as the axdocbook DTD, do not have a namespace, yet use the namespace on the markup within InsertAutoWithin elements in the DCF.
In the case where Editor does allow you to insert the indexterm, does it just not insert the additional markup specified in the DCF, or does something else happen?
On Tue, Aug 11, 2009 at 12:08 PM, Samah Abu-Mahmeed<email@example.com> wrote: > Hi Brandon, > > When I remove the prefix from the element attribute, AT does not allow > me to insert the element "indexterm" anymore! > > Samah > >
I'm afraid I'm down to grasping at straws, now, as I haven't done a whole lot with this feature and can't see any obvious problem with what you've done, though the needing to include the namespace prefix inside the "element" attribute does make me think something isn't quite right, as this doesn't follow the pattern of the examples in the distributed doctypes.
For reference, what version of Arbortext Editor are you using? Can you provide the full DTD and DCF you're working with (privately to me, if you aren't comfortable with making it available on the list)?
One other thing I'd suggest is only putting the non-required elements into the InsertAutoWithin, leaving Editor to supply the required ones as it normally does. Your last example appeared to follow that, but perhaps a little more experimentation with different combinations might shed some new light on the issue.
On Wed, Aug 12, 2009 at 10:56 AM, Samah Abu-Mahmeed<firstname.lastname@example.org> wrote: > Hi Brandon, > > No, the DTD does not incorporate a namespace. I just used it in the > markup. > > When it allows me to insert the indexterm, AT inserts the required field > (as in specified in the DTD) and does not insert the additional elements > I added in the dcf. I don't something else happening. > > <contexttransformations> > <insertautowithin element="evidbook:indexterm"<br"/>> xmlns:evidbook="evidbook.dtd"> > <evidbook:secondary></evidbook:secondary> > <evidbook:tertiary></evidbook:tertiary> > </insertautowithin> > </contexttransformations> > > > Thanks, > > Samah >