Dave Pawson | 19 Apr 07:03
Picon
Gravatar

New validator

 

Copied from xml-dev

The purpose of the Serene project is to create an open source
validation engine implementing the JAXP 1.3 Validation Framework API
for RELAX NG, that concentrates on good messages and a clear handling
of ambiguity and conflicts.

For this release, Serene has been extensively reviewed and refactored
in order to improve performance. Some bugs were fixed, messages were
slightly tweaked, one feature was added.

For more information, please come to
http://code.google.com/p/serene/

Thank you,
Radu Cernuta

--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

__._,_.___
Recent Activity:
.

__,_._,___
Michael[tm] Smith | 13 Apr 07:55
Picon
Favicon
Gravatar

Is SVG 1.1 RNG schema valid?

 

http://www.w3.org/Graphics/SVG/1.1/rng/svg-basic-font.rng has the following
(if you prefer to read it in RNC, see the RNC equivalents at the end)

<define name="SVG.font-face.extra.class">
<notAllowed/>
</define>

<define name="SVG.font-face.content">
<zeroOrMore>
<ref name="SVG.Description.class"/>
</zeroOrMore>
<optional>
<ref name="font-face-src"/>
</optional>
<ref name="SVG.font-face.extra.class"/>
</define>

So SVG.font-face.extra.class is defined as notAllowed at that point.

Then, http://www.w3.org/Graphics/SVG/1.1/rng/svg-font.rng has the following
(let's call it A):

<include href="svg-basic-font.rng"/>

<define name="SVG.font-face.extra.class" combine="interleave">
<optional>
<ref name="definition-src"/>
</optional>
</define>

Is that valid? Or should it instead be the following (let's call it B):

<include href="svg-basic-font.rng">
<define name="SVG.font-face.extra.class" combine="interleave">
<optional>
<ref name="definition-src"/>
</optional>
</define>
</include>

I ask because if I keep it as in A above, it causes jing to throw an NPE
(which is a bug in jing regardless, and I already raised an issue for it:
http://code.google.com/p/jing-trang/issues/detail?id=156), but if I change
it to B, jing works as expected.

--Mike

[1] Same bits above as RNC instead:

In file svg-basic-font.rnc:

SVG.font-face.extra.class = notAllowed
SVG.font-face.content =
SVG.Description.class*,
font-face-src?,
SVG.font-face.extra.class

Then in svg-font.rnc:

(A)
include "svg-basic-font.rnc"
SVG.font-face.extra.class &= definition-src?

(B)
include "svg-basic-font.rnc" {
SVG.font-face.extra.class &= definition-src?
}

--
Michael[tm] Smith http://people.w3.org/mike

__._,_.___
Recent Activity:
    .

    __,_._,___
    Terry Catapano | 12 Apr 17:45
    Picon

    odd result in trang-generated RNG

     

    I'm using Trang to generate a RelaxNG schema from a set of XML
    documents. I've run into a result I don't understand and which I hope
    someone can explain.

    Here are 4 xml documents:

    case1.xml: One A element followed by one B element

    <root>
    <A>xxxxx</A>
    <B>yyyyy</B>
    </root>

    case2.xml: One A element followed by two B elements

    <root>
    <A>xxxxx</A>
    <B>yyyyy</B>
    <B>yyyyy</B>
    </root>

    case3.xml: One B element followed by one A element

    <root>
    <B>yyyyy</B>
    <A>yyyyy</A>
    </root>

    case4.xml: Two B elements

    <root>
    <B>yyyyy</B>
    <B>yyyyy</B>
    </root>

    Using these 4 documents as input, Trang (both version 20081028 and
    20091111) generates the following RNG schema:

    <grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
    <start>
    <element name="root">
    <oneOrMore>
    <choice>
    <element name="A">
    <data type="NCName"/>
    </element>
    <element name="B">
    <data type="NCName"/>
    </element>
    </choice>
    </oneOrMore>
    </element>
    </start>
    </grammar>

    or in compact syntax:

    default namespace = ""

    start =
    element root {
    (element A { xsd:NCName }
    | element B { xsd:NCName })+
    }

    What is surprising to me is that the resulting pattern does not
    require a B element so that the following document:

    <root>
    <A>xxxxx</A>
    </root>

    is valid, though I'd assume it would be invalid, given that a B
    element is present in each of the input instances.

    Is this a bug or mistake on Trang's part or something which is to be
    understood as a reasonable result? I can imagine that inferring
    patterns from a set of sample documents must be difficult going and
    that what one gets from Trang might not be optimal. I would like to
    understand it better, however, so I can adjust my expectations for
    what I'll get from it and what additional work I might need to do to
    use what it produces.

    Thanks,

    Terry

    __._,_.___
    Recent Activity:
      .

      __,_._,___
      Syd Bauman | 25 Mar 17:41
      Favicon

      CFP: TEI tutorials & workshops (Mon 11-05 to Wed 11-07 @ TAMU)

       

      I think a 0.5 or 1.0 day hands-on tutorial on RELAX NG, or a 1.0 or
      1.5 day hands-on tutorial on Schematron would be quite apropos for
      this group. (What would be best, IMHO, is a 3-day hands-on tutorial
      on TEI customization that covers TEI, ODD, RELAX NG, and Schematron,
      but the call limits tutorials to 2 days.) -- Syd

      ===================================================

      Call for pre-conference workshop and tutorial proposals

      TEI and the C(r|l)o(w|u)d
      2012 Annual Conference and Members? Meeting of the TEI Consortium
      Texas A&M University, Initiative for Digital Humanities, Media, and Culture

      * Workshop proposals due Wed 15 May 2012
      * Workshop dates: Mon 5 November to Wed 7 November, 2012
      * Meeting dates: Wed 7 November to Sat 10 November, 2012 (see separate call)

      The TEI Conference and Members' Meeting will be preceded by
      educational tutorials or workshops. The goal of the tutorials is to
      give an opportunity to learn more about the use of TEI markup under
      the guidance of experienced instructors and practitioners, whereas
      workshops are an opportunity for specific groups to meet and work
      together on a TEI related subject.

      Workshops and tutorials range in length from a single morning or
      afternoon to a maximum of two days. Tutorials are run on a
      cost-recovery basis: a separate fee is charged of participants that
      is intended to cover the costs of running the tutorial. Workshops are
      expected to be free of charges.

      If you are interested in proposing either a workshop or a tutorial
      for the 2012 Members? Meeting and Conference, please submit your
      proposal as early as possible and before 15 May 2012 via conftool,
      the availability of which will be announced shortly. Expressions of
      interest should include as much as possible of the following
      information (the committee is willing to work with proposers in
      developing their proposals):
      * A proposed topic
      * A rationale explaining why this topic is likely to draw sufficient attention to the TEI community
      * Preferred length of the event
      * Infrastructural requirements
      * (In the case of a tutorial) A proposed instructor or slate of
      instructors including brief discussion of relevant experience,
      as well as a preliminary budget of your anticipated costs (if
      any).
      * (In the case of a workshop) A core list of people who are likely
      to participate, keeping in mind that workshops are by essence
      open for participation
      Organisational and infrastructure costs (e.g. coffee breaks and the
      like) will be determined later in conjunction with the local
      organising committee.

      Tutorial proposals will be evaluated by the programme committee
      primarily on the basis of their likely appeal to the TEI community,
      the quality of the proposed instructors and method of instruction,
      and cost. The committee will work with selected organizers after this
      date to refine the details of their proposals.

      Please send queries to meeting-Ezmyqz1S863YtjvyW6yDsg@public.gmane.org.

      For the International Programme Committee,

      Elena Pierazzo (chair)
      -------
      Dr Elena Pierazzo
      Lecturer in Digital Humanities
      Chair of the Teaching Committee
      Department of Digital Humanities
      King's College London
      26-29 Drury Lane
      London WC2B 5RL

      Phone: 0207-848-1949
      Fax: 0207-848-2980
      elena.pierazzo-3vygKqVCdQxaa/9Udqfwiw@public.gmane.org
      http://www.kcl.ac.uk/ddh

      __._,_.___
      Recent Activity:
        .

        __,_._,___
        Syd Bauman | 22 Mar 03:59
        Favicon

        CFP: TEI 2012 (Wed 11-07 to Sat 11-10 @ TAMU)

         


        Call for papers and proposals
        ==== === ====== === =========

        TEI and the C(r|l)o(w|u)d
        2012 Annual Conference and Members¹ Meeting of the TEI Consortium
        Texas A&M University, Initiative for Digital Humanities, Media, and Culture

        * Deadline for submissions: May 15, 2012
        * Meeting dates: Wed 7 November to Sat 10 November, 2011
        * Workshop dates: Mon 5 November to Wed 7 November, 2012 (see separate call)

        The Programme Committee of the 2012 Annual Meeting of the Text
        Encoding Initiative (TEI - http://www.tei-c.org/) Consortium invites
        individual paper proposals, panel sessions, poster sessions, and tool
        demonstrations particularly, but not exclusively, on digital texts,
        scholarly editing or any topic that applies TEI to its research.

        Submission Topics
        ---------- ------
        Topics might include but are not restricted to:
        - TEI and Google Books
        - Handicraft vs. Large Scale Digitization: a False Dichotomy?
        - TEI and massive digital collections
        - TEI and Recording Document Corrections
        - TEI and 'Dirty' OCR
        - TEI Schemas and Document Publication History
        - Text vs. Document: Can the TEI semantics express both?
        - TEI and text corpora
        - The relation between representation (encoded text) and presentation
        (visualisation, user-interface)
        - TEI encoded data in the context of quantitative text analysis
        - Integrating the TEI with other technologies and standards
        - TEI as metadata standard
        - TEI as interchange format: sharing, mapping, and migrating data (in
        particular in relation to other formats or software environments)

        In addition, we are seeking proposals for 5 minute micropaper
        presentations focused on experiences with the TEI guidelines gained
        from running projects and discussing one specific feature.

        Submission Types
        ---------- -----
        Individual paper presentations will be allocated 30 minutes: 20
        minutes for delivery, and 10 minutes for questions & answers.

        Panel sessions will be allocated 1.5 hours and may be of varied
        formats, including:

        * three paper-panels: 3 papers on the same or related topics

        * round table discussion: 5-8 presenters on a single theme. Ample
        time should be left for questions & answers after brief optional
        presentations.

        Posters (including tool demonstrations) will be presented during the
        poster session. The local organizer will provide flip charts and
        tables for poster session/tool demonstration presenters, along with
        wireless internet access. Each poster presenter is expected to
        participate in a slam immediately preceding the poster session.

        Micropapers will be allocated 5 minutes.

        Submission Procedure
        ---------- ---------
        All proposals should be submitted via conftool, the availability of which
        will be announced shortly. Please submit your proposals by May 15, 2012.

        If you don¹t have already one, you will need to create an account (i.e.,
        username and password) in order to file a submission. For each submission,
        you may upload files to the system after you have completed filling out
        demographic data and the abstract.

        * Individual paper or poster proposals (including tool
        demonstrations): Supporting materials (including graphics,
        multimedia, etc., or even a copy of the complete paper) may be
        uploaded after the initial abstract is submitted. Submission
        should be made in the form of an abstract of 750-1500 words (plus
        bibliography).

        * Micropaper: The procedure is the same as for an individual paper,
        however the abstract should be no more than 500 words. Please be
        sure the abstract mentions the TEI feature to be presented!

        * Panel sessions (three paper panels): The panel organizer submits
        a proposal for the entire session, containing a 500-word
        introduction explaining the overarching theme and rationale for
        the inclusion of the papers, together with a 750-1500 words
        section for each panel member.

        * Panel sessions (round table discussion): The panel organizer
        submits a proposal of 750-1500 words describing the rationale for
        the discussion and includes the list of panelists. Panelists need
        to be contacted by the panel organizer and have expressed their
        willingness in participation before submission.

        Information
        -----------
        All proposals will be reviewed by the program committee and selected
        external reviewers.

        Those interested in holding working paper sessions outside the
        meeting session tracks should contact the meeting organizers at
        meeting-Ezmyqz1S863YtjvyW6yDsg@public.gmane.org to schedule a room.

        Please send queries to meeting <at> tei-c.org.

        Conference submissions will be considered for conference proceedings,
        edited as a special issue of the Journal of the Text Encoding
        Initiative. Further details on the submission process will be
        forthcoming.

        For the International Programme Committee,

        Elena Pierazzo (programme committee chair)

        __._,_.___
        Recent Activity:
          .

          __,_._,___
          Jason Sachs | 27 Feb 20:09
          Picon
          Gravatar

          jing + RELAX NG xsd:token on attributes: spaces coalesced?

           

          I'm confused. If I use the schema attrbug.rnc (see below) it seems to
          let through multiple spaces in a row, even though that shouldn't be
          legal.

          I'm using this pattern:
          xsd:token { pattern="[A-Za-z_][A-Za-z_0-9]*( [A-Za-z_][A-Za-z_0-9]*)*" }

          Below is a test file that I'm using with "java -jar jing.jar -c
          attrbug.rnc attrbug.xml".

          What's going on here? Does jing coalesce spaces in attributes before
          matching against xsd:token? Or am I missing something?

          --Jason

          --- begin file attrbug.xml ---
          <?xml version="1.0" encoding="UTF-8"?>
          <model>
          <item class="foo bar baz">we want a class attribute with multiple
          identifiers separated by single spaces.
          </item>
          <item class="foo bar baz">why does this not fail?</item>
          <item class="3 4 5">this fails as expected</item>
          </model>
          --- end file ---

          --- begin file attrbug.rnc ---
          # RELAX NG compact-syntax grammar

          grammar {

          # contains a model element
          # the model element contains one or more item elements

          start = element model { model-content }

          model-content =
          item+

          item =
          (element item { item-content })

          item-content =
          attribute class { identifier-array },
          arbitrary-text-description

          ############### Text patterns ###############

          arbitrary-text-description =
          text

          identifier =
          xsd:token { pattern="[A-Za-z_][A-Za-z_0-9]*" }

          identifier-array =
          xsd:token { pattern="[A-Za-z_][A-Za-z_0-9]*( [A-Za-z_][A-Za-z_0-9]*)*" }

          }
          --- end file ---

          __._,_.___
          Recent Activity:
            .

            __,_._,___
            Alex Muir | 16 Feb 14:33
            Picon

            Generating _1 = element * { notAllowed } any ideas why?

             

            In doing a conversion as follows

            jing -s -c dk-extensions.rnc > dk-extensions.rng
            trang dk-extensions.rng dk-common.rnc


            I get this in the resulting output file:

            _1 = element * { notAllowed }

            And within the file a bunch of:

                 | _1

            which result in interleave errors elsewhere in the document

            E [Jing] the element "nutrition" from namespace "http://docbook.org/ns/docbook" can occur in more than one operand of "interleave"

            unless removed.

            Any idea why?

            Regards

            --

            Alex Muir
            Program Organizer - University Technology Student Work Experience Building
            University of the Gambia

            http://sites.utg.edu.gm/alex/

            Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
            Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

            Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/

            __._,_.___
            Recent Activity:
            .

            __,_._,___
            Alex Muir | 16 Feb 12:12
            Picon

            Creating a Flat rnc File Automatically

             

            Hi,

            I've written a script that I thought would flatten various rnc files into one such that dk-extensions.rnc includes cookery.inc, phrasebook.inc and db-publishers-sc.rnc but I'm not sure it works.

            jing -s -c dk-extensions.rnc > dk-extensions.rng
            trang dk-extensions.rng dk-common.rnc

            although when I search for some of the text included in the dk-extensions.rnc by the cookery.inc or phrasebook.inc I don't easily find it.

            include "../cookery/cookery.inc"
            include "../phrasebook/phrasebook.inc"


            Or if I search for  "condition.attribute" which is included by the following text I don't find it in the resulting dk-common.rnc

            include "db-publishers-sc.rnc" {
              db.condition.attribute =
               
                ## DK Specific: values are enumerated here:
                attribute condition { "prt" | "dig" | "imperial" | "metric" }
            }

            Any thoughts on what I'm doing wrong or if this should work at all?

            Regards



            --

            Alex Muir
            Program Organizer - University Technology Student Work Experience Building
            University of the Gambia

            http://sites.utg.edu.gm/alex/

            Come visit Gambia enjoy the sun and culture and help out! Software Engineering Lecturers needed!
            Join UTSWEB do local contract work or give a student a contract remotely for slow, cheap and good work http://sites.utg.edu.gm/utsweb/

            Some fantastic African/Canadian Fusion  http://bafila.bandcamp.com/

            __._,_.___
            Recent Activity:
            .

            __,_._,___
            Tara Athan | 7 Feb 15:58
            Picon

            RuleML in Relax NG

             

            Hi Relax NG Colleagues, RuleML Version 1.0 has recently been released: http://mail.ruleml.org/pipermail/ruleml-all/2012-January/000325.html This (fine-grained, freely-combinable modular) RuleML release * is the first to use Relax NG * still maintains XSD for 'Rosetta'-style comparison * is the last planned to use hand-written XSD (RuleML 1.1 etc. are planned in Relax NG only, with XSD generated from it) We hope for your feedback on RuleML 1.0, which should be sent directly to ruleml-all by February 29, 2012 (http://mail.ruleml.org/mailman/listinfo/ruleml-all). Feedback on RuleML as a use case for Relax NG should be sent to the current list. There are a number of (XSD and Jing/Trang) issues that are causing the generation of XSD from our modularized Relax NG to be not fully automated. These include: 1. Inability to reproduce our Relax NG modularization in XSD, thus requiring translation for each sublanguage. Due to the large number of possible sublanguages, these transformations will have to be performed on-demand through a web application. We use a multi-step process, where the Relax NG is simplified (either Jing -s or a custom flattening), then converted to (monolithic) XSD with Trang. 2. Jing/Trang Issue 51 (http://code.google.com/p/jing-trang/issues/detail?id=51&sort=id&colspec=ID%20Type%20Status%20Priority%20Stars%20Module%20Summary) For the first step of the above transformation, all we really need is the flattening of the modular Relax NG schema to remove "include"s. The lack of this Trang option causes us to (currently) use Jing -s instead, leading to greater modification of the schema than we really need. For example, we use meaningful names (formula-assert, formula-query) for context-dependent patterns, which are replaced by number-indexed names (formula_1, formula_2), making the resulting XSD hard to read. We are exploring implementing a transformation that would flatten the Relax NG modularization without otherwise simplifying. Has this been implemented elsewhere? 3. Jing/Trang Issue 140 (http://code.google.com/p/jing-trang/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Stars%20Module%20Summary&groupby=&sort=id&id=140) also causes trouble because "notAllowed" is used throughout our modularization. We could avoid this problem if we had the flattening option mentioned above (either Trang or custom) which would not perform such simplifications. We would be interested in any recommendations - please respond on this list, as these topics are of general interest to the Relax NG user community. Best, Tara and Harold
            __._,_.___
            Recent Activity:
            .

            __,_._,___
            jcchartrand | 11 Jan 20:12
            Picon
            Favicon

            RNG parser

             

            Hello,

            I'm hoping someone can point me at a library (preferably java) that will parse an RNG schema and subsequently answer questions like:

            What parents are allowed for a given element?

            What children are allowed for a given element?

            What are the attributes of a given element?

            So that I can in turn set up a RESTful web service having a call like:

            GET http://myservice.ca/schemaName/elementName

            returning JSON, something like:

            { "element" : "elementName",
            "allowableChildren" : ["child1", "child2", "child3"],
            "allowableParents" : ["parent2", "parent2"],
            "attributes" : ["attrib1", "attrib2"],
            "documentation" : "documentationIfAvailable"
            }

            The information would be used to provide general and contextual help in an online js editing environment we're building. The general help would look a lot like the TEI help pages, e.g.,

            http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-actor.html

            The contextual help would filter allowed tags given current tag position.

            james

            __._,_.___
            Recent Activity:
            .

            __,_._,___
            Jim Orcheson | 18 Dec 13:04
            Picon
            Favicon

            Newbie With jing Problem

             

            As a test, I created a simple DocBook document by copying example 1.2
            from DocBook 5: The Definitive Guide:

            <?xml version="1.0" encoding="utf-8"?>
            <article xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
            <title>Sample article</title>
            <para>This is a very short article.</para>
            </article>

            I then attempted to validate this using jing:

            java -jar /usr/share/java/jing.jar relaxng.rng test.xml

            and also:

            java -jar /usr/share/java/jing.jar -c relaxng.rnc test.xml

            In both cases I get the following output:

            > /home/jim/test/documentation/test.xml:2:78: error: element "article"
            > not allowed here; expected element "ns:attribute", "ns:choice",
            > "ns:data", "ns:element", "ns:empty", "ns:externalRef", "ns:grammar",
            > "ns:group", "ns:interleave", "ns:list", "ns:mixed", "ns:notAllowed",
            > "ns:oneOrMore", "ns:optional", "ns:parentRef", "ns:ref", "ns:text",
            > "ns:value" or "ns:zeroOrMore" (with
            > xmlns:ns="http://relaxng.org/ns/structure/1.0")

            So, I am obviously doing something wrong, but I cannot figure out what
            by reading the jing documentation. Any help would be greatly appreciated.

            Jim

            __._,_.___
            Recent Activity:
            .

            __,_._,___

            Gmane