
One follow-up question about custom XML Refactoring operations: I like how my descriptor file can contain a text description that shows up in the page of the wizard where the end user sets parameter values. Is there any way for me to add text at the top of the Scope and Filters page of the wizard? For my particular operation, it is important that the end user NOT choose “Project” as the scope, and I’d like to be able to reinforce that. It is not a big deal, but it would be nice. Thanks, Amanda From: oXygen-user [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of Amanda Galtman Sent: Monday, March 06, 2017 11:10 AM To: Radu Pisoi <radu_pisoi@sync.ro>; oxygen-user@oxygenxml.com Subject: Re: [oXygen-user] Can custom XML Refactoring operation resolve XIncludes via doc()? Radu, Thanks for the information and suggestion. I see what you mean, and your idea worked in my situation. Best regards, Amanda From: oXygen-user [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of Radu Pisoi Sent: Thursday, March 02, 2017 10:14 AM To: oxygen-user@oxygenxml.com<mailto:oxygen-user@oxygenxml.com> Subject: Re: [oXygen-user] Can custom XML Refactoring operation resolve XIncludes via doc()? Hi, Unfortunately there is no out of the box setting that can activate the XInclude expansion for the documents loaded with the doc function. As a simple workaround, you can use the following XSLT snippet to recursively expand the XInclude nodes: <xsl:template match="/"> <!-- ... --> <xsl:variable name="tsDoc" select="doc('path/to/targetset')"/> <xsl:variable name="expandedTS" > <xsl:apply-templates select="$tsDoc" mode="expand-xi"/> </xsl:variable> <!-- Continue processing with XInclude expanded... --> </xsl:template> <!-- Expand xi:include nodes --> <xsl:template xmlns:xi="http://www.w3.org/2001/XInclude"<http://www.w3.org/2001/XInclude> match="xi:include[@href]" mode="expand-xi"> <xsl:variable name="externalDoc" select="doc(resolve-uri(@href, base-uri(.)))"<mailto:doc(resolve-uri(@href,base-uri(.)))>/> <xsl:apply-templates select="$externalDoc" mode="expand-xi"/> </xsl:template> <!-- Copy template --> <xsl:template match="node() | @*" mode="expand-xi"> <xsl:copy> <xsl:apply-templates select="node() | @*" mode="expand-xi"/> </xsl:copy> </xsl:template> -- Regards, Radu -- Radu Pisoi <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 2/27/2017 7:33 PM, Amanda Galtman wrote: Hi, I see from the following doc page that custom XML Refactoring operations disable the XInclude mechanism. https://oxygenxml.com/doc/versions/18.1/ug-editor/topics/custom-refactoring-... I understand the purpose of “safe mode” for the file that the refactoring operation is modifying. In my case, my refactoring operation needs to retrieve data from an auxiliary XML file using doc(). The other XML file is a DocBook targetset file. Read-only access to the targetset file is good enough, but I really need to get inside the subordinate XInclude files. Is this possible in the context of a custom XML Refactoring XSLT operation? Thanks, Amanda _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com<mailto:oXygen-user@oxygenxml.com> https://www.oxygenxml.com/mailman/listinfo/oxygen-user