Publicly accessible subschemas?

42 views
Skip to first unread message

Olof L

unread,
May 23, 2019, 12:01:32 PM5/23/19
to akomantoso-xml
Hi,

we are currently looking into developing a subschema of AKN that further sets out specific rules for the structure and content of documents. We are looking into using either schematron or xsd to this end.

Despite many instutitions using AKN, we can't find any other examples (except for the rather minimal adaption in Chile) of subschemas for us to compare our concept to. Does anybody have any suggestions in this regard?

Kind regards

Alexandre Rafalovitch

unread,
May 23, 2019, 12:03:44 PM5/23/19
to akomant...@googlegroups.com
Maybe AKN4UN : https://unsceb.org/content/akn4un

Regards,
     Alex

--
You received this message because you are subscribed to the Google Groups "akomantoso-xml" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xm...@googlegroups.com.
To post to this group, send email to akomant...@googlegroups.com.
Visit this group at https://groups.google.com/group/akomantoso-xml.
To view this discussion on the web visit https://groups.google.com/d/msgid/akomantoso-xml/ea72cde8-776d-437a-99ab-c1545734b225%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fabio Vitali

unread,
May 23, 2019, 1:19:19 PM5/23/19
to akomant...@googlegroups.com
Try http://akn.web.cs.unibo.it/akgenerator/

Best regards

Fabio Vitali
> --
> You received this message because you are subscribed to the Google Groups "akomantoso-xml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xm...@googlegroups.com.
> To post to this group, send email to akomant...@googlegroups.com.
> Visit this group at https://groups.google.com/group/akomantoso-xml.
> To view this discussion on the web visit https://groups.google.com/d/msgid/akomantoso-xml/ea72cde8-776d-437a-99ab-c1545734b225%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.




--

Fabio Vitali The sage and the fool
Dept. of Informatics go to their graves
Univ. of Bologna ITALY alike in this respect:
phone: +39 051 2094872 both believe the sage to be a fool.
e-mail: fa...@cs.unibo.it Where, then, may wisdom be found?
http://vitali.web.cs.unibo.it/ Qi, "Neither Yes nor No", The codeless code

Ashok Hariharan

unread,
May 23, 2019, 1:19:58 PM5/23/19
to akomant...@googlegroups.com

Fabio Vitali

unread,
May 23, 2019, 1:22:34 PM5/23/19
to akomant...@googlegroups.com
Great minds think alike!

Fabio

--
> To view this discussion on the web visit https://groups.google.com/d/msgid/akomantoso-xml/CAMxPVW58G1PYVsD0rC%3D5S-uQcroUVrkCOhuFRaxM6-DnV_8J%2BA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.




--

Leps, Olof (init)

unread,
May 23, 2019, 2:06:28 PM5/23/19
to akomant...@googlegroups.com

Hi,


thanks a lot! 


We did know the subschema generator and also know the AKN4UN-Specification, but find that they are not really applicable to our case - do you know any other examples, possibly using schematron, too?


Kind regards

Olof



Von: akomant...@googlegroups.com <akomant...@googlegroups.com> im Auftrag von Fabio Vitali <fvi...@gmail.com>
Gesendet: Donnerstag, 23. Mai 2019 19:22:30
An: akomant...@googlegroups.com
Betreff: Re: [akomantoso-xml] Publicly accessible subschemas?
 
Great minds think alike!

Fabio

--

> Il giorno 23 mag 2019, alle ore 19:19, Ashok Hariharan <as...@hariharan.org.in> ha scritto:
>
> Hi Olof --
>
> There is an AKN subschema generator:
>
> http://akn.web.cs.unibo.it/akgenerator/
>
>
>
> On Thu, May 23, 2019 at 9:33 PM Alexandre Rafalovitch <araf...@gmail.com> wrote:
> Maybe AKN4UN : https://unsceb.org/content/akn4un
>
> Regards,
>     Alex
>
> On Thu, May 23, 2019, 12:01 PM Olof L, <olof...@init.de> wrote:
> Hi,
>
> we are currently looking into developing a subschema of AKN that further sets out specific rules for the structure and content of documents. We are looking into using either schematron or xsd to this end.
>
> Despite many instutitions using AKN, we can't find any other examples (except for the rather minimal adaption in Chile) of subschemas for us to compare our concept to. Does anybody have any suggestions in this regard?
>
> Kind regards
>
> --
> You received this message because you are subscribed to the Google Groups "akomantoso-xml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xm...@googlegroups.com.
> To post to this group, send email to akomant...@googlegroups.com.
> Visit this group at https://groups.google.com/group/akomantoso-xml.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


> For more options, visit https://groups.google.com/d/optout.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


>
> --
> You received this message because you are subscribed to the Google Groups "akomantoso-xml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xm...@googlegroups.com.
> To post to this group, send email to akomant...@googlegroups.com.
> Visit this group at https://groups.google.com/group/akomantoso-xml.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


> For more options, visit https://groups.google.com/d/optout.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


>
> --
> You received this message because you are subscribed to the Google Groups "akomantoso-xml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xm...@googlegroups.com.
> To post to this group, send email to akomant...@googlegroups.com.
> Visit this group at https://groups.google.com/group/akomantoso-xml.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


> For more options, visit https://groups.google.com/d/optout.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.






--

Fabio Vitali                                          The sage and the fool
Dept. of Informatics                                     go to their graves
Univ. of Bologna  ITALY                               alike in this respect:
phone:  +39 051 2094872                  both believe the sage to be a fool.
e-mail: fa...@cs.unibo.it                  Where, then, may wisdom be found?
http://vitali.web.cs.unibo.it/   Qi, "Neither Yes nor No", The codeless code

--
You received this message because you are subscribed to the Google Groups "akomantoso-xml" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xm...@googlegroups.com.
To post to this group, send email to akomant...@googlegroups.com.
Visit this group at https://groups.google.com/group/akomantoso-xml.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


To view this discussion on the web visit https://groups.google.com/d/msgid/akomantoso-xml/AC205FAB-903A-4F63-AACC-F0229F83F029%40gmail.com.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


For more options, visit https://groups.google.com/d/optout.
Mit Google Groups können Sie Online-Foren und E-Mail-basierte Gruppen erstellen, sich daran beteiligen und interessante Diskussionen mit anderen Mitgliedern führen.


Fabio Vitali

unread,
May 23, 2019, 3:26:41 PM5/23/19
to akomant...@googlegroups.com
Dear Olof

The expressive power of Schematron is equivalent to that of XML Schema 1.1. Actually, Schematron rules can be applied only to individual tags, while XML Schema 1.1 assertions can be associated to Complex Types and thus be used much more flexibly.

In reality, XML Schema 1.1 mandates support only for a radically simplified syntax of XPath for co-constraints (see section 3.11.6.3 of the XML Schema 1.1 standard), and leaves to individual implementations the choice of implementing the full XPath 2.0 language as an option. Thus, assertions according to the requirements of XML Schema 1.1 can only use basically useless Xpaths. On the other hand, XSD1.1 validation engines exist that extend the reach of the XML Schema 1.1 requirements providing full XPath support.

At the moment, two XML parsers provide XML Schema 1.1 validation with full XPath support: Saxon Enterprise Edition (http://saxon.sourceforge.net/ ) which is a commercial application (the freeware Saxon Home Edition does not support it), and Apache Xerces (http://xerces.apache.org/ ), which is an open source tool.

To be more precise, the *last official release* of Xerces, 2.11.0 (dated 2010) provides only partial support for XML Schema and absolutely no full XPath. Since then, though, several unofficial betas have emerged, and the latest I checked, 2.12-beta-r1667115, DOES provide full XML Schema 1.1 and full XPath. Although not an official release, it appears to be a fairly stable application, as proved by the fact that well-known Java software project management tools such as Maven do routinely install version 2.12-beta-r1667115 when requested for a Xerces module.

So I do not see how switching to Schematron can help when you have XML Schema 1.1 with full XPath support available for free.

regards

Fabio Vitali

--

> Il giorno 23 mag 2019, alle ore 20:06, Leps, Olof (init) <Olof...@init.de> ha scritto:
>
> Hi,
>
> thanks a lot!
>
> We did know the subschema generator and also know the AKN4UN-Specification, but find that they are not really applicable to our case - do you know any other examples, possibly using schematron, too?
>
> Kind regards
> Olof
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/akomantoso-xml/0db7e1eed5df4095b1d6178ba6d1fba6%40init.de.
> For more options, visit https://groups.google.com/d/optout.


Matthew Lynch

unread,
May 23, 2019, 4:46:42 PM5/23/19
to akomant...@googlegroups.com
Hi Olof,

This might not be in point but on a project I'm working on for drafting UK and Scottish legislation in AKN, we've adopted an approach where we validate documents against both the full AKN schema and a custom schematron file we're developing. The schematron file encodes the more specific "business rules" of our jurisdiction  and enables us to mix structure-based rules (like a <chapter> may only be a child of a <part>) with rules that depend on the text content or pattern matching, for example. We were inspired to take this approach by another European legislative drafting software project who do the same.

So for us schematron isn't really a true "subschema" but it is used to effectively constrain what is permissible in our AKN documents.

We're currently working towards an imminent delivery deadline but once that is passed we should be in a position to share some stuff publicly. We'll definitely have something to show at the Ravenna Summer School. 

Kind regards,

-Matt Lynch
Parliamentary Counsel Office
Scottish Government

Monica Palmirani

unread,
May 23, 2019, 6:40:22 PM5/23/19
to akomant...@googlegroups.com
Dear all,

for examples see also here:

In attachment you can see the list of the use-cases and example bulks.

If you have more information about use-cases please add them in the file and resent it.

All the best,

Monica


-- 
===================================
Full professor of Legal Informatics 
School of Law
Alma Mater Studiorum Università di Bologna 
C.I.R.S.F.I.D. http://www.cirsfid.unibo.it/ 
Palazzo Dal Monte Gaudenzi - Via Galliera, 3 
I - 40121 BOLOGNA (ITALY) 
Tel +39 051 277217 
Fax +39 051 260782 
E-mail  monica.p...@unibo.it 
====================================

Akoma Ntoso-casi-uso.docx

Olof L

unread,
May 27, 2019, 5:22:39 AM5/27/19
to akomantoso-xml

Dear All,

dear Matt,

 

Thanks for the helpful insights into your project. Your use case sounds very similar to ours and we would appreciate the possibility to take a look at your work as soon as you’re ready to share.

 

In our context we want to implement both structural constraints (such as “a clause can contain either content or subclauses”) and content constraints (ie. logic based on attribute values). We’re currently considering two approaches to the formulation of these constraints:

 

Option A: All constraints asserted

Structural rules: XPath-based constraints (Schematron or XSD1.1 assertions)

Content rules: XPath-based constraints (Schematron or XSD1.1 assertions)

Validation: AKN-Schema and XPath-based ruleset for structure and content

 

Option B: Specified structures and asserted content

Structural rules: Custom XSD1.0 or XSD1.1 schema (overwriting AKN types)

Content rules: XPath-based Schematron rules in additions to custom XSD1.0 or constraints as XSD1.1 assertions within the same XSD1.1

Validation: AKN-schema and [custom XSD1.0 schema + Schematron rules] or AKN-schema and custom XSD1.1 schema

 

@Matt: From what I understand you’re pursuing option A, correct? We haven’t ruled out that option yet, but are a bit wary of the complexity involved in formulating (and maintaining) all our structural rules in a rule set free of contradictions. As we also intend to source a WYSIWYG-editor the issue of completion suggestions based on Schematron keeps cropping up.

 

@Fabio: Do you know of any XML-editors sufficiently Schematron-aware to offer completion suggestions based on Schematron/XPath-assertions?

 

Regards,

Olof

Reply all
Reply to author
Forward
0 new messages