Please find attached to this email files myElement.css and myElement.xml
which should show you the best XXE can do in your case.
The ``trick'' used to obtain this result is:
---
myElement:before,
field:before {
display: inline;
content: division(attributes(margin-top, 1ex,
margin-bottom, 1ex,
margin-left, 1ex,
margin-right, 1ex));
}
---
Notice that the division() is displayed as an inline.
References:
See
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/styling_attributes.html
See http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/text-field.html
On 04/30/2012 07:23 AM, Marcel Tromp wrote:
> Another thing I noticed is that even when I display the attributes, they
> cannot be edited in the main window, only in the attribute window. Is
> there any way around this?
On 04/30/2012 07:00 AM, Marcel Tromp wrote:
Thanks for the pointers.
I have something simple up and running, but I am having a hard time
dealing with attributes.
For the xml below, I am trying to get the elementA attributes A and B to
be displayed after <name>. I am also trying to display the field
attributes C* and D* as cells in a table for all the fields.
Any recommendations how to do this?
<?xml version="1.0" encoding="UTF-8" ?>
<myElement attrA="A" attrB="B">
<name>a name</name>
<title>a title</title>
<description>description 1</description>
<description>description 2</description>
<field attrC="C0" attrD="D0"
<name>name0</name>
<title>title0</title>
<description>description 01</description>
<description>description 02</description>
</field>
<field attrC="C1" attrD="D1"
<name>name1</name>
<title>title1</title>
<description>description 11</description>
<description>description 12</description>
</field>
<field attrC="C2" attrD="D2"
<name>name2</name>
<title>title2</title>
<description>description 21</description>
<description>description 22</description>
</field>
</myElement>
myElement,
field,
name,
title,
description {
display: block;
}
myElement,
field {
border: 2px solid silver;
padding: 1ex;
margin: 1.33ex 0;
}
myElement:before,
field:before {
display: inline;
content: division(attributes(margin-top, 1ex,
margin-bottom, 1ex,
margin-left, 1ex,
margin-right, 1ex));
}
myElement::attribute("attrA"),
myElement::attribute("attrB"),
field::attribute("attrC"),
field::attribute("attrD") {
attribute-content-left: attribute-label() ":";
attribute-content-middle: text-field(attribute, attribute-name(),
font-weight, normal);
show-attribute: always;
font-weight: bold;
}
name,
title,
description {
margin-left: 16ex;
}
name:before,
title:before,
description:before {
display: marker;
content: element-name() ": ";
font-weight: bold;
}
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="myElement.css" type="text/css" ?>
<myElement attrA="A" attrB="B">
<name>a name</name>
<title>a title</title>
<description>description 1</description>
<description>description 2</description>
<field attrC="C0" attrD="D0">
<name>name0</name>
<title>title0</title>
<description>description 01</description>
<description>description 02</description>
</field>
<field attrC="C1" attrD="D1">
<name>name1</name>
<title>title1</title>
<description>description 11</description>
<description>description 12</description>
</field>
<field attrC="C2" attrD="D2">
<name>name2</name>
<title>title2</title>
<description>description 21</description>
<description>description 22</description>
</field>
</myElement>
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support