cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

DCF and InsertAutoWithin

bibach
1-Visitor

DCF and InsertAutoWithin

Samah,

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 🙂

Brandon Ibach
Developer, Single-Sourcing Solutions, Inc.

On Tue, Aug 11, 2009 at 10:34 AM, samah
abu-mahmeed<sabu-mahmeed@jonesmcclure.com> 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"&lt;br"/>> xmlns:evidbook="evidbook.dtd">>
> <evidbook:primary></evidbook:primary>
> <evidbook:secondary></evidbook:secondary>
> <evidbook:tertiary></evidbook:tertiary>
> </insertautowithin>
> </contexttransformations>
>
>
>
>
>
> Thanks,
>
>
>
> Samah
>
> ----------
>
7 REPLIES 7
samah
1-Visitor
(To:bibach)

Hi Brandon,

When I remove the prefix from the element attribute, AT does not allow
me to insert the element "indexterm" anymore!

Samah

bibach
1-Visitor
(To:bibach)

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?

-Brandon 🙂

On Tue, Aug 11, 2009 at 12:08 PM, Samah
Abu-Mahmeed<sabu-mahmeed@jonesmcclure.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
>
>
samah
1-Visitor
(To:bibach)

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>
bibach
1-Visitor
(To:bibach)

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.

-Brandon 🙂

On Wed, Aug 12, 2009 at 10:56 AM, Samah
Abu-Mahmeed<sabu-mahmeed@jonesmcclure.com> 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"&lt;br"/>> xmlns:evidbook="evidbook.dtd">
> <evidbook:secondary></evidbook:secondary>
> <evidbook:tertiary></evidbook:tertiary>
> </insertautowithin>
> </contexttransformations>
>
>
> Thanks,
>
> Samah
>
samah
1-Visitor
(To:bibach)

Hi John,

It is okay to share our DTD with Adepters, right?

Samah
samah
1-Visitor
(To:bibach)

Oops, disregard my last email 🙂
samah
1-Visitor
(To:bibach)

Hi Brandon,

There was another thread that discussed the same problem:

Announcements

Top Tags