Hussein Shafie schrieb:

> Michael Huebner wrote:
>
>> Hi,
>>
>> -----Original Message-----
>> From: Hussein Shafie [mailto:hussein at pixware.fr]
>> Sent: 17. juni 2003 13:29
>> To: Kevin Flynn
>> Cc: xmleditor-support at xmlmind.com
>> Subject: Re: [XXE] Some wishes
>>
>>
>> Kevin Flynn wrote:
>>  >+ 1 ...
>>  >+ - the ability to filter the ID elements displayed in the menu 
>> (using an XPath expression or even just an element name)?
>>  >+
>>  >+ I use ID/IDREF for a variety of different purposes in my 
>> documents, and it
>>  >+ would be great to be able to display only the IDs that are 
>> actually of
>>  >+ interest in a given context.
>>  >+
>>  >+ 2 An XXE-CSS command that enabled the display of an element to be
>>  >+ constructed from the result of an XPath expression would be great 
>> (one could
>>  >+ then, for example, display the actual title of a cross-referenced 
>> section).
>>  >+ I know XXE only implements a subset of XPath, but even a subset 
>> would
>>  >+ presumably open up quite a few possibilities...
>>
>> + I don't think that the subset of XPath currently implemented in XXE is
>> + powerful enough. You could just use it to search an element or an
>> + attribute in the *subtree* of the element which is the target of 
>> the CSS
>> + rule. And for what you want to do, this is not enough.
>>
>> I have the same needs:
>> 1. to filter the ID elements for set-attribute-button() (e.g. by 
>> element name e.g. "tag", i.e as XPath "//tag/@id-attr")      
>> (important and urgent for me)
>>       Initially the name of the ID attribute can be ignored. But for 
>> compatibility with XPath it should be specified.
>> 2. the possibility to display in the styled view some attributes of 
>> an object referred by means of IDREF. (important, but not so urgent 
>> for me)
>>    A consequence of this would be the wish to have the possibility to 
>> display these attributes also in the ID selection list (hence 
>> becoming a kind of ID selection table).
>>
>> When will there be a solution available?
>
>
> In principle, we do not disclose what we are doing (because we may 
> delay certain features indefinitely).
>
> * V2.6 should include a *full* implementation of XPath 1.0.
> * It should be possible to use XPath in CSS style sheets to do things 
> similar to what Kevin Flynn and you have described.
>
> V2.6 is not expected before February 2004.
>
>> Btw. in XML schema there is an appropriate mechanism to define keys 
>> and references as a solution to 1.
>> http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions
>> Is this mechanism exploited in XMLmind Professional?
>
>
> XMLmind XML Editor, both editions, fully implements XML Schemas and 
> this includes identity constraints.
>
> Free Standard Edition is just restricted by the fact that XML Schemas 
> must have certain target namespaces. See 
> http://www.xmlmind.com/xmleditor/stdedition.html
>
>
Hi,

the xpath()-Expression  of Version2.6 works really fine to display the 
name (or any other single attribute) of a referenced  element.
So I could change
    set-attribute-button(attribute, user, text, attr(user))
to
    set-attribute-button(attribute, user, text, 
xpath("id(@relation-role)/@name"))
where "name" is an attribute of type CDATA. This type is neccesarry to 
allow spaces in the value of the attribute "name".

Thank you very much for this feature!

One problem:
Now I tried to display the concatenation of the values of attributes. I 
wrote in my css-file:
    set-attribute-button(attribute, user, text, 
xpath("id(@relation-role)/concat(@name, ' ', @id)"))
but on opening the xml-file I got an error
    .../ucx.css:277:124: not supported value for property "content":
    cannot parse XPath expression "id(@object)/concat(@name, ' ', @id)": 
expected node test

How can I get the concatenation of the values of attributes?


Another problem:
I don't know how I can use xpath to filter the elements to be displayed 
in the selection dialog of a "set-attribute-button()".

(B.t.w. the documentation page for "set-attribute-button()" in 
docs/csssupport/ch05s26.html is very short and has only the example:

set-attribute-button(attribute, for,
                     unset-attribute, yes,
                     icon, icon(pop-right));

for the general syntax:

set-attribute-button(attribute, attribute_name, key, value, ..., key, value)

I think that it would be good to provide on this documentation page an 
example for the existing keys "text" and "color", too.)

My proposal is to add a key "selection" where the value is an xpath 
expression that denotes the elements that can be selected, e.g. 
"//person" to select all elements of type "person".
The default value would be "//*".

My proposal is also to add a key "list-item-display" where the value is 
a string (constructed from xpath expressions) that describes the 
appearance of the items in the selection list. E.g. if the "selection" 
key is set to ""//person", the "list-item-display" could be 

"concat(@firstname, ' ', @lastname)"


The default value for  "list-item-display" would be the attribute that 
is of type ID in the referenced element.

If elements of different types (e.g. person and group) should be 
selectable, this could be achieved by having multiple entries of the 
keys, e.g.

set-attribute-button(attribute, user, 
        selection, "//person", 
        list-item-display, "concat(@firstname,  ' ',  @lastname)",
        selection, "//group",
        list-item-display, "@name")

Or is there already a way to achieve the desired behavior?

-- 
Best regards
Michael H?bner

-----------------------------------------------
- Michael H?bner                 Voice: +49/3677/69-2871
- Ilmenau Technical University   Fax:   +49/3677/69-1220
- Dept. Process Informatics      http://www.theoinf.tu-ilmenau.de/proinf
----------------------------------------------- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20040608/5dec2528/attachment.htm
 

Reply via email to