Hussein, Thank you for the quick and helpful response. Your customer support is exemplary.
Tim -----Original Message----- From: Hussein Shafie <huss...@xmlmind.com> Sent: Saturday, August 1, 2020 3:25 AM To: Tim Trese <tim_tr...@selinc.com> Cc: 'xmleditor-support@xmlmind.com' <xmleditor-support@xmlmind.com> Subject: Re: [XXE] Modular Glossary [FIXED BOGUS LINK] [Caution - External] On 7/31/20 9:03 PM, Tim Trese wrote: > > Using XXE for DocBook. I am trying to make a glossary document > comprising of sibling <glossentry>s from other glossary files. If I > were doing this in directly in XML, I think what I wish to do would > look something like: > > --------------------- > > <?xml version="1.0" encoding="UTF-8"?> > > <glossary version="5.1" > xmlns="https://urldefense.com/v3/__http://docbook.org/ns/docbook__;!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXXfF4yW9U$ > " > > xmlns:xlink="http://www.w3.org/1999/xlink" > > xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" > > xmlns:xi="http://www.w3.org/2001/XInclude" > > xmlns:trans="http://docbook.org/ns/transclusion" > > xmlns:svg="http://www.w3.org/2000/svg" > > xmlns:m="http://www.w3.org/1998/Math/MathML" > > xmlns:html="http://www.w3.org/1999/xhtml" > > xmlns:db="http://docbook.org/ns/docbook"> > > <glossdiv> > > <title>Glossary</title> > > <glossentry> > > <glossterm>My first entry</glossterm> > > <glossdef> > > <para>Definition of my first entry</para> > > </glossdef> > > </glossentry> > > <xi:xinclude href="MySecondGlossary.xml" > xpointer="/glossary/glossdiv/glossentry"/> > > </glossdiv> > > </glossary> > > ------------------ > > …although I’m somewhat new to this and it’s possible that I > misunderstand proper usage of XInclude. > > Nothing like this appears to be possible directly in XXE. Is there a > good workaround, or is there a way I can do this with custom > configuration of XXE? No need for a workaround or a custom configuration. All this can be achieved after getting acquainted to "Copy As Reference"/Paste. See tutorial: "Creating a modular document", https://urldefense.com/v3/__https://www.xmlmind.com/xmleditor/_tutorial/modular_doc/index.html__;!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXXtDKSPKg$ =================================================================== Recommended procedure: use XXE, no "hand editing" of the XML source whatsoever =================================================================== 0) Use "Options|Preferences", "Edit" section and turn on "Allow advanced use of XInclude". See attached screenshot "0allow_advanced_xinclude_option.png" See https://urldefense.com/v3/__https://www.xmlmind.com/xmleditor/_distrib/doc/help/editOptions.html__;!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXX6p7mSxA$ 1) Let's suppose you want to include some of the glossary entries found in "glossary2.xml" after the first glossary entry of "glossary1.xml". See attached screenshot "1two_glossaries.png". REMEMBER: For most uses of XInclude, you are required to give an xml:id attribute to your glossary entries. 2) Use XXE node selection to select a contiguous range of glossary entries in "glossary2.xml". See attached screenshot "2select_entries_in_glossary2.png". See tutorial "101 ways to select nodes" https://urldefense.com/v3/__https://www.xmlmind.com/xmleditor/_tutorial/select_nodes/index.html__;!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXX-d8RBFk$ Then copy a *reference* to selected nodes using "Edit → Reference → Copy as Reference" (keyboard shortcut: Ctrl+Shift-C). See https://urldefense.com/v3/__https://www.xmlmind.com/xmleditor/_distrib/doc/help/referenceMenu.html*copyAsInclusionAction__;Iw!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXXvc89ZEY$ 3) Now in "glossary1.xml", select first glossary entry. See attached screenshot "3select_entry_glossary1.png". 4) Execute "Edit→Paste After" (keyboard shortcut: Ctrl-W). See attached screenshot "4paste_after_selected_entry_of_glossary1.png". Et voilà! =================================================================== --> The recommended procedure let XXE generate this kind of advanced but standard XInclude for you: --- <xi:include href="glossary2.xml" xpointer="xpointer(/*/*[1]/*[position() >= 2 and position() <= last()])"/> --- See attached screenshot "5advanced_xinclude.png" See "XPointer Framework, W3C Recommendation 25 March 2003" https://urldefense.com/v3/__https://www.w3.org/TR/xptr-framework/__;!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXXsXTum8Y$ > The solution will also have to be supported by XSL Utility and XSL > Server. > Sorry but using this kind of advanced XInclude (XPointer Framework) probably do not work in XSL Utility and XSL Server. XSL Utility and XSL Server both rely on the XML parser to implement XInclude and this XML parser (namely Xerces) currently has limited support for XInclude. See "E. Support of XInclude in XMLmind XSL Utility", https://urldefense.com/v3/__https://www.xmlmind.com/foconverter/_distrib/xslutil/doc/help/xinclude_support.html__;!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXXIJiSeFw$ But may be you don't need XSL Utility and XSL Server. May be XXE suffices. We have "xxetool", a command-line utility, which is basically the XMLmind XML Editor desktop application, but without a graphical user interface (GUI). Its main use is to convert XML documents to other formats (HTML, PDF, RTF, etc) from within a script or a makefile. More information "The xxetool command-line utility", https://urldefense.com/v3/__https://www.xmlmind.com/xmleditor/_distrib/doc/xxetool/index.html__;!!O7uE89YCNVw!e34mnnYzODUS_bD5cBBaUHJ12qyR1Vil_abG3tL5b2l4CY4Ez-ksEkXXWy6gpmU$ -- XMLmind XML Editor Support List xmleditor-support@xmlmind.com https://www.xmlmind.com/mailman/listinfo/xmleditor-support