Andreas Kemkes wrote:
>>>page:before {
>>> display: block;
>>> color: red;
>>> content: division(content(list(rows, 1,
>>> attribute, type,
>>> selection, single
>>> values, "...\A\DpageTypeC)));
>>>}
>>>
>
> All attempts have been futile. Ideally, I would like
> to pre-populate it from an enumerated list in the
> schema. Is that achievable?
Yes, and it *really* works (XMLmind XML Editor is not buggy software):
simply remove the "values" field. Note that for this to work, "type"
must really be a ``pure enumeration'' (i.e. no union).
Excerpts of form-sampler.xsd and form-sampler.css (see below):
---
<xs:element name="cymk1" type="CYMK1" />
<xs:element name="cymk2" type="CYMK" default="black" />
<xs:simpleType name="CYMK">
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="cyan" />
<xs:enumeration value="yellow" />
<xs:enumeration value="magenta" />
<xs:enumeration value="black" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CYMK1">
<xs:attribute name="value" type="CYMK" default="black" />
</xs:complexType>
---
---
cymk2,
cymk1 {
display: inline-block;
font-size: smaller;
padding: 1px; /*Needed to display the red border of the selection*/
}
cymk1 {
content: list(attribute, value,
labels, "Cyan\A Yellow\A Magenta\A Black");
}
cymk2 {
content: list(rows, 3);
}
---
You have written "...\A\DpageTypeC". What is "\A\D"? It should be "\A "
(with a space after the "\A"). See
http://www.w3.org/TR/REC-CSS2/syndata.html#q4
I agree that this is highly non-intuitive, but it is the standard.
> But in the meantime, it would be great to see a
> working example. I searched the distribution, and
> couldn't find it. Are there other sources?
We'll add one (form-sampler.xml, see attached screenshot) to the demo/
subdirectory contained in our distribution.
Meanwhile you can download it from this private download area:
---
http://www.pixware.fr/_download/Andreas/form-sampler.zip
5282bytes, Mon Apr 24 10:33:27 AM CEST 2006
---
I suggest to unzip this archive in our demo/ subdirectory.
Note that I've not tested this form-sampler.xml with v2.11, but just
with v3.2.
>
> Using your xpath suggestion from below, I found
> another way:
>
> graphic:before {
> display: block;
> content: paragraph(content(image(attr(src)),
> xpath("./alt")));
> }
>
> Oddly enough, it doesn't work the same using the
> almost identical
>
> graphic {
> display: block;
> content: paragraph(content(image(attr(src)),
> xpath("./alt")));
> }
>
> The alt is not displaying in the 2nd case. Is there a
> reason?
May be the above "graphic" rule conflicts with another "graphic" rule,
while the "graphic:before" rule does not. I doubt that you can find a
bug here.
>
> No, a few reloads while working on the css tuning.
> Admittedly, the working document is graphics heavy.
> After I switched to thumbnails, the problem doesn't
> occur. Increasing the heap settings in my opinion
> will only mask the problem, because the document loads
> fine the first time, only the reloads (closing and
> re-opening) are causing the issue.
No. You could be ``close to the edge'' in terms of memory usage and in
such case, increasing the heap settings would really be the cure to this
problem.
>>>images won't display anymore due to a Java heap
>>space
>>>issue. Continuing freezes it up. Is this a
>>memory
>>>leak in the version I'm using and fixed in V3.2?
>>You are the first person to report such problem.
>>May be you just need
>>to increase the amount of memory which XMLmind XML
>>Editor is allowed to
>>use. Learn how here:
>>
> http://www.xmlmind.com/xmleditor/user_faq.html#outofmemory
>
> Again, if some of the issues would be fixed by
> switching from 2.11 to the new version, I would do
> that. I just trying to avoid to run into the same
> limitations afterwards.
The only possible issue is the above memory leak, which I cannot
reproduce easily (in fact, I can't believe you have found a memory
leak). I suggest to increase the heap settings *and*, if you can,
upgrade to latest version.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form-sampler.png
Type: image/png
Size: 25218 bytes
Desc: not available
Url :
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20060424/e9301bd8/attachment.png