hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hensley, Richard" <>
Subject Schema Object Manipulate Question
Date Tue, 24 May 2005 21:44:16 GMT
I have the following schema

    <schema id="ItemManager">
        <element name="server" content-translator="object" />

This above dictates the following xml:


When I use it, I really want whatever the object provider produces using the
contents as one of the elements in my configuration list.

The following works, but does not have the syntax that I desire.

    <schema id="ItemManager">
        <element name="server">
            <attribute name="server" translator="object" required="true" />

			<push-attribute attribute="server" />
                <invoke-parent method="addElement" />

The above dictates the following xml:

<server name="instance:package.class" />

Not really what I want. Does anybody have any suggestions?

At the moment I'm using the following custom rule.

public class PushContentRule extends BaseRule implements Rule {

    public void begin(SchemaProcessor processor, Element element) {
        String value = RuleUtils.processText(processor, element, element
        Translator t = processor.getContentTranslator();
        Object finalValue = t.translate(processor.getContributingModule(),
            Object.class, value, element.getLocation());

    public void end(SchemaProcessor processor, Element element) {

with a schema that looks like.

        <element name="server" content-translator="object">
                <custom class="util.PushContentRule" />

                <invoke-parent method="addElement" />

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message