/*
 * Copyright (c) 2003-2008 Pixware. 
 *
 * This file is part of the XMLmind XML Editor project.
 * For conditions of distribution and use, see the accompanying legal.txt file.
 *
 * A generic style sheet for XML data.
 */

* {
    display: block;
    collapsible: yes;
    not-collapsible-head: 1;
    border: 1 solid #D0D0D0;
    padding: 1;
    margin: 8 4;
}

@property-value element-header(title, background)
    division(content(paragraph(content(collapser(collapsed-icon, 
                                                 icon(pop-right), 
                                                 expanded-icon,
                                                 icon(pop-down)), " ",
                                       title, 
                                       replace-button(tool-tip, "Replace"), 
                                       " ",
                                       insert-before-button(tool-tip, 
                                                            "Insert Before"), 
                                       " ",
                                       insert-button(tool-tip, "Insert"), 
                                       " ",
                                       insert-after-button(tool-tip, 
                                                           "Insert After"), 
                                       " ",
                                       convert-button(tool-tip, "Convert"), 
                                       " ",
                                       delete-button(tool-tip, "Delete"), 
                                       "  ",
                                       add-attribute-button(
                                           check-has-attributes, yes,
                                           color, navy,
                                           tool-tip, "Add Attribute")),
                                background-color, background,
                                padding-left, 4),
                     attributes(margin-top, 2,
                                margin-bottom, 2,
                                margin-left, 2,
                                margin-right, 2)));
*:before {
    display: inline;
    content: element-header(argument-list(element-name(), "  "), #D0D0D0);
}

/* 
 * ***Trick*** no replaced content if element content type is different 
 * from data (i.e. mixed, element only, etc).
 */

* {
    content: value-editor();
}

*::attribute {
    attribute-content-left: attribute-name();
    attribute-content-middle: value-editor(attribute, attribute());
    attribute-content-right: 
        remove-attribute-button(attribute, attribute(),
                                check-required, yes,
                                color, navy,
                                tool-tip, "Remove Attribute");
    show-attribute: when-added;
}
