Hussein Shafie wrote:
> Marc Portier wrote:
>
>>Hope you can help out on this newby question
>
>
> Not really a newbie question!
>
euh, thx :-S
>
>
>>[1] I'm having a dtd with
>>
>><!ELEMENT inline-group EMPTY>
>><!ATTLIST inline-group src CDATA #REQUIRED>
>>
>>--> to be transformed to some XInclude kind of structure in
>>processing (doesn't really matter, but gives clearer feel of what
>>it is about I guess)
>>
>><!ELEMENT picture EMPTY>
>><!ATTLIST picture
>> src CDATA #REQUIRED
>> alt CDATA #IMPLIED
>> height CDATA #REQUIRED
>> width CDATA #REQUIRED
>> >
>>
>>[2] I'ld like both elements to behave as documentResources so I
>>had the following in the configuration *.xxe file
>>
>> <cfg:documentResources xmlns="">
>> <cfg:resource path="//picture/@src" />
>> <cfg:resource path="//inline-group/@src" />
>> </cfg:documentResources>
>
>
> Perfect.
>
>
>
>
>>[3] in the stylesheet is the only difference:
>>
>>inline-group {
>> display: block;
>>}
>>inline-group:before {
>> content: "<inline-group src=\"" attr(src) "\" />";
>> color: #296D94;
>> font-family: monospace;
>>}
>>picture {
>> text-align: center;
>> display: inline-block;
>> content: image(attr(src), attr(width), attr(height));
>>}
>>
>>I would like to have the same "Edit Attribute src" dialog which
>>pops up on a right-mouse on the image (same dialog as for
>>right-click on <img> in xhtml) to do the same for editing the
>>//inline-group/@src
>
>
> There is currently no way to do this.
>
> Note that the dialog box is not related at all to the concept of
> documentResources.
>
> This convenience dialog box is only displayed by image ``gadgets'' which
> get their images from an attribute. It has been added in a hurry to
> allow casual users to easily upload images to a remote site.
No pro, actually I already found out about the fact that the
image() inside css was the real trigger, so I actually hacked it
up like this for the moment:
inline-group {
background-color: #eeeeee;
content: " to select @src right-click: " image(attr(src), 20, 20);
}
inline-group:before {
content: "<inline-group src=\"" attr(src) "\" />";
color: #296D94;
font-family: monospace;
}
which displays the broken image for the moment, but I can live
with this.
I presume this approach will trigger more error-handling inside
xxe (since the src will not point to images) but it doesn't seem
to affect preformance ATM.
-marc=
PS: I am up now facing the next challenge: making sure I can let
xxe open the referenced xml document in the inline-group/@src
(cause it will point to an XML file) still looking for the
command or Java API call that will cause that.
--
Marc Portier http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://radio.weblogs.com/0116284/
mpo at outerthought.org mpo at apache.org