Groups | Search | Server Info | Login | Register


Groups > comp.text.xml > #893

Re: Schematron questions

From Peter Flynn <peter@silmaril.ie>
Newsgroups comp.text.xml
Subject Re: Schematron questions
Date 2018-05-17 22:51 +0100
Message-ID <fm6br2Fs67sU1@mid.individual.net> (permalink)
References <87vabuodmk.fsf@hri.res.in> <c30e5652-67cf-431a-af95-7da3533718d8@googlegroups.com> <871see5kta.fsf@gmail.com> <87sh6u44hh.fsf@gmail.com>

Show all headers | View raw


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

Back to comp.text.xml | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Schematron questions "N. Raghavendra" <raghu@hri.res.in> - 2018-05-11 12:58 +0530
  Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-11 13:44 +0530
  Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-12 13:43 +0530
  Re: Schematron questions George Bina <george@oxygenxml.com> - 2018-05-14 06:52 -0700
    Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-14 20:46 +0530
      Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-14 21:24 +0530
        Re: Schematron questions Peter Flynn <peter@silmaril.ie> - 2018-05-17 22:51 +0100
          Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-18 13:52 +0530
            Re: Schematron questions Manuel Collado <m-collado@users.sourceforge.net> - 2018-05-18 15:39 +0200
              Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-18 20:40 +0530
            Re: Schematron questions Peter Flynn <peter@silmaril.ie> - 2018-05-18 20:56 +0100
              Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-19 10:15 +0530
                Re: Schematron questions Peter Flynn <peter@silmaril.ie> - 2018-05-20 22:32 +0100
                Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-05-21 08:30 +0530
                Re: Schematron questions Peter Flynn <peter@silmaril.ie> - 2018-06-29 22:32 +0100
                Re: Schematron questions "N. Raghavendra" <nyraghu27132@gmail.com> - 2018-07-01 00:24 +0530

csiph-web