Benoit Maisonny wrote: > > I have trouble with the graphic file selection dialog in our custom > configuration: > > 1. Double-click on a "broken image" icon for an element which has an > xlink:href attribute. > 2. Select a file in "Source location", select "Reference as", press OK. > 3. XXE gives an error message: "Cannot change object: the specified > operation would make the document invalid."
I cannot reproduce this problem.
I've created a configuration in order to test that. See attached
example2.tar.gz. Please modify this very simple configuration in order
to reproduce the above problem and then, send me back the modified
configuration.
>
> I don't see how changing the value of this attribute would make it
> invalid. Moreover, changing the attribute directly in the Attribute
> Editor works just fine. I wish there would be more details as to what
> DTD/schema rule would be broken.
>
> Can you tell us more about what happens in XXE after one presses OK
> above?
---
private static boolean setObjectValue(String objectValue,
Element element,
Name attributeName,
DocumentView docView) {
// objectValue is an URI or encoded binary data.
ElementEditor editor = docView.getElementEditor();
editor.setEditedElement(element);
if (attributeName != null) {
if (editor.canPutAttribute(attributeName, objectValue)) {
editor.putAttribute(attributeName, objectValue);
return true;
}
} else {
if (editor.canSetText(objectValue)) {
editor.setText(objectValue);
return true;
}
}
Alert.showError(docView.getPanel(),
Msg.msg("SO.operationNotAllowed"));
return false;
}
---
> This operation used to work fine in our configuration, so I
> suspect we must have broken something, but I can't figure out what.
>
May be the image viewport is incorrectly declared in your CSS. See
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/image-viewport.html
and (simpler)
http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/image.html
In my example2 configuration, it's:
---
@namespace xlink url(http://www.w3.org/1999/xlink);
...
image {
content: image(attr(xlink|href));
}
---
example2.tar.gz
Description: GNU Zip compressed data
-- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

