Resolving of images programatically

Hi I'm trying to resolve content using a custom AuthorReferenceResolver. My code looks like this: public SAXSource resolveReference(AuthorNode node, String systemId, AuthorAccess authorAccess, EntityResolver entityResolver) { String outerXml = "<image href=\"GUID-527A0A8F-D089-438D-A4F7-28C6E999660D\" />"; InputSource inputSource = new InputSource(); inputSource.setCharacterStream(new StringReader(outerXml)); XMLReaderWithGrammar resolveXMLReaderWithGrammar = authorAccess.getXMLUtilAccess().newNonValidatingXMLReader(this._grammarCache) ; XMLReader reader = resolveXMLReaderWithGrammar.getXmlReader(); return new SAXSource(reader, inputSource); } If this gets executed my image element is not resolved. Is there anyway on forcing this? Thanks Jan Bevers | Developer | SDL | Content Management Technologies Division | +32 (0)15 400 970 | jbevers@sdl.com

Hi Jan, I do not quite understand what the purpose of the code is. The references resolver is used to resolve conrefs (and in your case varrefs) and to show the referenced content in place in the Author mode. Resolving images content does not pass through this code, Oxygen requires the image content directly through the custom URL handler. Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 2/25/2013 4:57 PM, Jan Bevers wrote:
Hi
I’m trying to resolve content using a custom AuthorReferenceResolver.
My code looks like this:
public SAXSource resolveReference(AuthorNode node, String systemId, AuthorAccess authorAccess, EntityResolver entityResolver) {
String outerXml = "<image href=\"GUID-527A0A8F-D089-438D-A4F7-28C6E999660D\" />";
InputSource inputSource = new InputSource();
inputSource.setCharacterStream(new StringReader(outerXml));
XMLReaderWithGrammar resolveXMLReaderWithGrammar = authorAccess.getXMLUtilAccess().newNonValidatingXMLReader(this._grammarCache);
XMLReader reader = resolveXMLReaderWithGrammar.getXmlReader();
return new SAXSource(reader, inputSource);
}
If this gets executed my image element is not resolved. Is there anyway on forcing this?
Thanks
*Jan Bevers |* Developer *|*SDL *| *Content Management Technologies Division *| *+32 (0)15 400 970*|* jbevers@sdl.com image001
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
participants (2)
-
Jan Bevers
-
Oxygen XML Editor Support