Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Peter Flynn Newsgroups: comp.text.xml Subject: Re: Schematron questions Date: Thu, 17 May 2018 22:51:30 +0100 Lines: 49 Message-ID: References: <87vabuodmk.fsf@hri.res.in> <871see5kta.fsf@gmail.com> <87sh6u44hh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net aFElG38eKrZ4il+Q1oSx9Q7pWNh5GLfQ2lxk16eiIRk2jE+9r+ Cancel-Lock: sha1:DyVKQm3OfZaDWqN2nnB/HrHJDsc= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-Reply-To: <87sh6u44hh.fsf@gmail.com> Content-Language: en-US Xref: csiph.com comp.text.xml:893 On 14/05/18 16:54, N. Raghavendra wrote: > At 2018-05-14T20:46:49+05:30, N. Raghavendra wrote: > >> At 2018-05-14T06:52:04-07:00, George Bina wrote: >> >>> However, there are no tools that will provide you guided editing based >>> on the Schematron schema, like for example showing you what elements >>> are possible at some point in the document when you are editing. >> >> Thank you for your reply. >> >> I found RELAX NG Compact Syntax schema for Schematron at >> >> https://github.com/Schematron/schema >> >> The nXML mode of Emacs provides schema-sensitive editing using RELAX NG >> Compact Syntax. So, it should be possible to use the above in Emacs, >> and get completion for allowed element names, etc. > > I think I misunderstood your statement. With what I said, I can only > edit a Schematron schema in nXML mode. nXML mode won't provide me > context-sensitive completion, etc., for editing a document that is an > instance of that schema. I have been trying to make it clear for some time that nXML is *not* an editor suitable for writing XML documents. What you want is psgml, which has the full set of document-editing features (completion, insertion, encapsulation, deletion, change, splitting, attribute editing, etc). Install it from your Emacs repos (I think it's in marmelade).¹ There is a separate xxml-mode.el which provides even more editing features.² But psgml only works with DTDs (XML DTDs as well as SGML DTDs) as it has no knowledge of RNG or W3C schemas. This is usually not a problem for the document-world (books, journals, articles), where RNG/W3C are rarely used yet. When I win the Lottery I will fund an elisp expert to modify psgml a) to support RNG/W3C; b) to add a few features like element-join; and c) merge the features of xxml-mode and fix a few trivial buglets. Unless some valiant elisp hacker cares to step up to the plate... ///Peter ¹ M-x package-refresh-contents RET M-x package-install RET psgml RET ² See https://www.emacswiki.org/emacs/PsgmlMode for links