Page 1 of 1

Author view not updating

Posted: Tue May 10, 2011 10:41 pm
by ghudson
Hi,
I have an AuthorOperation which updates the XML document. That works correctly, but after the update, the Author view doesn't show the change unless some text is edited in the Text view. The change not showing up is displayed as CSS read-only, ie

content : " WAC " xpath("../../Heading/SectionCite/TitleNumber/text()") "-" xpath("../../Heading/SectionCite/ChapterNumber/text()") "-" xpath("../../Heading/SectionCite/SectionNumber/text()") " " xpath("../../Heading/Caption/text()") " ";

Here is a snippet of the code which inserts the XML in AuthorOperation:

if (displayDialog(oxygenFrame)) {
docController.deleteNode((AuthorNode) heading);
docController.insertXMLFragmentSchemaAware(getHeadingFragment(map),"ancestor::OTSSection/Section",
AuthorConstants.POSITION_INSIDE_FIRST);
}

Any idea on how to make the Author view update?

Re: Author view not updating

Posted: Wed May 11, 2011 10:17 am
by Radu
Hi,

We recently fixed a problem related to this (and the fix will be available in a couple of weeks in Oxygen 12.2), problem which could be avoided if you use the "xpath" function as the single CSS property of the selector.

So if you CSS selector is like:

Code: Select all

element{
content: xpath('.....');
display:block;
......
}
you can split it in two selectors:

Code: Select all

element{
content: xpath('.....');
}
and

Code: Select all

element{
display:block;
.....
}
If the workaround still does not work:

Usually when using xpath expressions in the CSS the rendered content updates about 4-5 seconds after the modification has been made.
Are you sure the xpath expression result is influenced by the modifications you are making?

If this is not the case maybe you can send to our support email address (support at oxygenxml dot com) some sample XML + CSS and more details (some sample Java code of the operation).

Regards,
Radu