Convenient insertion of XInclude from project view

Hi, I was looking for user friendly ways of inserting xi:include into document opened in Author view. I have realized that closest functionality to this is dragging file from project view to Author view. For some document types (e.g. DocBook) this includes <link> element pointing to this file. I can't imagine use of such <link> elements. Wouldn't it be better to insert xi:include instead? Maybe this could be improvement for future versions. Am I right that in order to modify this behavior I have to make my own implementation ro.sync.ecss.extensions.docbook.Docbook5ExternalObjectInsertionHandler class? Thanks, Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------

Hi Jirka, You seem to have a point here. I added this as an improvement request. Does anybody else on the list have some input on this? So what would be more useful when dropping files (which are not images) in a Docbook document? Adding links or xi:includes to them? We are also considering adding some actions for easier insertion of XIncludes in any opened XML document. Yes, the "ro.sync.ecss.extensions.docbook.Docbook5ExternalObjectInsertionHandler" class is the one responsible for this behavior within Docbook 5 documents. Our SDK includes the Java sources for the entire Docbook framework implementation: http://www.oxygenxml.com/developer.html#XML_Editor_Authoring_SDK So you can either : Replace the library "OXYGEN_INSTALL_DIR\frameworks\docbook\docbook.jar" with a version recompiled from our sources and containg your modifications. Or You can create a patch library "patch.jar" containing only the recompiled modified class, edit the Docbook 5 Document Type Association from the Oxygen Preferences and in the "Classpath" tab add the path to the patch library before the entry pointing to the "docbook.jar". Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 5/3/2011 11:38 AM, Jirka Kosek wrote:
Hi,
I was looking for user friendly ways of inserting xi:include into document opened in Author view. I have realized that closest functionality to this is dragging file from project view to Author view. For some document types (e.g. DocBook) this includes<link> element pointing to this file. I can't imagine use of such<link> elements. Wouldn't it be better to insert xi:include instead? Maybe this could be improvement for future versions.
Am I right that in order to modify this behavior I have to make my own implementation ro.sync.ecss.extensions.docbook.Docbook5ExternalObjectInsertionHandler class?
Thanks,
Jirka
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Radu Coravu wrote:
We are also considering adding some actions for easier insertion of XIncludes in any opened XML document.
That would be nice. I would like to see XInclude treated more transparently. For example for my drag'n'drop solution I have to modify schema to allow xi:include elements on dozen places otherwise oXygen complained about breaking validity by inserting xi:include element. But if I force oXygen to do insert anyway, resulting document is valid because validation is processing XIncludes. It would be really great if XInclude can be used on any document, even if the corresponding document doesn't explicitly define xi:include elements in schema. Thanks for prompt response, I have my XInclude drag'n'drop already working. It was quite easy hack. Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------

Hi Jirka, You are probably editing Docbook 5 XML with RNG schema. Docbook 5 also has a RNG schema which allows xi:include in any element. This schema is used by default by Oxygen for validation if the schema is not associated from inside the XML document: OXYGEN_INSTALL_DIR/frameworks/docbook/5.0/rng/docbookxi.rng But you are probably using the standard RNG schema with the XML. Even so, the schema aware editing (controlled from the Oxygen Preferences->"Editor / Pages / Author / Schema aware" page) should probably allow xi:includes to be inserted anywhere as the RNG Jing validation is done after the <xi:include> tags are expanded. So we'll look into this and probably make a fix in a future version. Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 5/3/2011 4:02 PM, Jirka Kosek wrote:
Radu Coravu wrote:
We are also considering adding some actions for easier insertion of XIncludes in any opened XML document.
That would be nice. I would like to see XInclude treated more transparently. For example for my drag'n'drop solution I have to modify schema to allow xi:include elements on dozen places otherwise oXygen complained about breaking validity by inserting xi:include element. But if I force oXygen to do insert anyway, resulting document is valid because validation is processing XIncludes.
It would be really great if XInclude can be used on any document, even if the corresponding document doesn't explicitly define xi:include elements in schema.
Thanks for prompt response, I have my XInclude drag'n'drop already working. It was quite easy hack.
Jirka

Radu Coravu wrote:
You are probably editing Docbook 5 XML with RNG schema.
Docbook 5 also has a RNG schema which allows xi:include in any element. This schema is used by default by Oxygen for validation if the schema is not associated from inside the XML document: OXYGEN_INSTALL_DIR/frameworks/docbook/5.0/rng/docbookxi.rng
Situation is little bit more complicated -- I'm using my own customization of DocBook 5 schema -- I have to change it to be derived from docbookxi.rng in order to get XInclude smoothly working in oXygen.
But you are probably using the standard RNG schema with the XML. Even so, the schema aware editing (controlled from the Oxygen Preferences->"Editor / Pages / Author / Schema aware" page) should probably allow xi:includes to be inserted anywhere as the RNG Jing validation is done after the <xi:include> tags are expanded. So we'll look into this and probably make a fix in a future version.
That would be really nice and useful. Thanks, Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/03/2011 07:26 AM, Radu Coravu wrote:
Does anybody else on the list have some input on this?
+1 for Jirka's proposal. Also, please implement a file picker when you insert an xi:include element. It was easy to hack in my customized framework, but it should be there by default. Thanks, David -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNwAFhAAoJEMHeSXG7afUhLzYH/03LyIFSAR6IPQ65At4my4WJ pVkgEaqbqC04Bp8U0uG92LG5qUtr2CcPPI7Yxr1pQEd1UA4hjnDy7OPjqeRUx2ao dQ8bm1zF1S9mBbtO521x/xygzcpREPAMloyQMMPPQFKqasIqF1MlNdN6ASFLRX97 PzMAQd0jsvRMLWVrPfhuTO9fhhWAUo+Pgezm7YHE3meHknnGVgtdfkxYFzgNgqpL 1ms93bcD57k0MVz/dAzmelWtVc7PZ6AZlIRkkQ56Jk/36QFsMOxklkWlRozQbOQF xJb2jHRwI7kOecBGuMhW1ZuMScaECAiF3413GrO5mi5B/6FJeyOKSzf1WFGj67k= =cC7u -----END PGP SIGNATURE-----

David Cramer wrote:
On 05/03/2011 07:26 AM, Radu Coravu wrote:
Does anybody else on the list have some input on this?
+1 for Jirka's proposal.
Also, please implement a file picker when you insert an xi:include element. It was easy to hack in my customized framework, but it should be there by default.
And one more suggestion which I have just implemented in my customization -- if you drag Xincluded file into "verbatim" element like programlisting parse="text" is added automatically to show source code listing instead of trying parse a file. Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------
participants (3)
-
David Cramer
-
Jirka Kosek
-
Radu Coravu