[oXygen-user] Can custom XML Refactoring operation resolve XIncludes via doc()?

Oxygen XML Editor Support (Radu Pisoi) support at oxygenxml.com
Tue Mar 7 03:42:40 CST 2017


Hi,

No, there is no way to customize the *Scope and Filters* page from the 
*XML Refactoring* dialog.

A possible solution would be to add additional information in the XML 
Refactoring operation descriptor for this customization. I will register 
this improvement on our side.

Regards,
Radu
--
Radu Pisoi
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 3/6/2017 11:01 PM, Amanda Galtman wrote:
>
> 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 at oxygenxml.com] *On 
> Behalf Of *Amanda Galtman
> *Sent:* Monday, March 06, 2017 11:10 AM
> *To:* Radu Pisoi <radu_pisoi at sync.ro>; oxygen-user at 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 at oxygenxml.com] *On 
> Behalf Of *Radu Pisoi
> *Sent:* Thursday, March 02, 2017 10:14 AM
> *To:* oxygen-user at oxygenxml.com <mailto:oxygen-user at 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%28resolve-uri%28 at href,base-uri%28.%29%29%29>/>
>
>     <*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-operations-x-tools.html
>
>     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 at oxygenxml.com <mailto:oXygen-user at oxygenxml.com>
>
>     https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20170307/77db4d9d/attachment.html>


More information about the oXygen-user mailing list