Package com.volantis.mcs.xml.schema.model

Examples of com.volantis.mcs.xml.schema.model.CompositeModel


                            .add(b)
                            .add(choice().add(c).add(d))
                            .add(bounded(e).optional())
                            .add(bounded(f).atLeastOne()));

            CompositeModel MIXED = choice().add(j).add(g).add(PCDATA);
            g.setContentModel(sequence()
                                   .add(bounded(h).optional())
                                   .add(bounded(i))
                                   .add(bounded(MIXED)));
        }
View Full Code Here


            // b can contain any amount of a, c or PCDATA.
            b.setContentModel(bounded(choice().add(a).add(b).add(PCDATA)));

            // a can contain any amount of b or PCDATA but excludes itself from
            // all nested elements.
            CompositeModel a_content = choice().add(b).add(PCDATA);
            a_content.exclude(choice().add(a));
            a.setContentModel(bounded(a_content));
        }
View Full Code Here

        // Define the form controls content set.
        // See http://www.w3.org/TR/2003/REC-xforms-20031014/slice8.html#id2625797
        FORM_CONTROLS.add(input).add(secret).add(textarea).add(submit)
                .add(select).add(select1);

        CompositeModel UI_COMMON = choice();

        // Add the form controls to the XHTML 2 Structural and Text content
        // sets.
        // See http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-xforms.html#XForms_Form_Controls
        xhtml2.STRUCTURAL.add(FORM_CONTROLS);
        xhtml2.TEXT.add(FORM_CONTROLS);

        // todo this has been commented out because the code cannot deal with
        // todo this correctly. Once LabelStrategy has been changed to collect
        // todo not just text but an OutputBuffer containing text inline markup
        // todo then the following can be uncommented.
//        // Add the XHTML 2 Text content set to UI_INLINE.
//        // See http://www.w3.org/TR/2006/WD-xhtml2-20060726/mod-xforms.html#XForms_Form_Controls
//         UI_INLINE.add(xhtml2.TEXT);
//
//        // Exclude any form controls from appearing within other form elements
//        // that can contain text.
//         UI_INLINE.exclude(FORM_CONTROLS);

        // (PCDATA|UI_INLINE)*
        ContentModel MIXED_UI_INLINE = bounded(
                choice().add(PCDATA).add(UI_INLINE));

        label.setContentModel(MIXED_UI_INLINE);

        // label, (UI_COMMON)*
        CompositeModel CONTROL_MODEL =
                sequence().add(label).add(bounded(UI_COMMON));

        INPUT_CONTENT.add(UI_COMMON);

        input.setContentModel(sequence().add(label).add(bounded(INPUT_CONTENT)));
        secret.setContentModel(CONTROL_MODEL);
        CompositeModel SUBMIT_CONTENT = choice().add(setvalue).add(UI_COMMON);
        submit.setContentModel(sequence().add(label).add(bounded(SUBMIT_CONTENT)));
        textarea.setContentModel(CONTROL_MODEL);

        // (PCDATA)
        value.setContentModel(PCDATA);
        setvalue.setContentModel(PCDATA);

        // label, value, (UI_COMMON)*
        item.setContentModel(
                sequence()
                        .add(label)
                        .add(value)
                        .add(bounded(UI_COMMON)));

        CompositeModel LIST_UI_COMMON = choice().add(item);

        // label, (LIST_UI_COMMON)+, (UI_COMMON)*
        CompositeModel SELECT_MODEL =
                sequence()
                        .add(label)
                        .add(bounded(LIST_UI_COMMON).atLeastOne())
                        .add(bounded(UI_COMMON));
        select.setContentModel(SELECT_MODEL);
        select1.setContentModel(SELECT_MODEL);

        // ====================================================================
        //             Group Module
        // ====================================================================

        // (FORM_CONTROLS|group|UI_COMMON)
        CompositeModel GROUP_CHOICE =
                choice().add(FORM_CONTROLS).add(group).add(UI_COMMON);
        group.setContentModel(
                sequence()
                        // label?,
                        .add(bounded(label).optional())
View Full Code Here

TOP

Related Classes of com.volantis.mcs.xml.schema.model.CompositeModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.