adaptivity_options.rnc produces invalid relax-rng schema

Bug #814667 reported by Lawrence Mitchell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fluidity
Fix Released
Undecided
Unassigned

Bug Description

A long way down in adaptivity_options.rnc is the following definition:
element format {
    "triangle",
    comment
}

This produces an invalid RNG file, since elements cannot contain data and string children.

Minimal test case:

$ cat > foo.rnc <<\EOF
start =
   (
      element format {
         "triangle",
         element comment {
            xsd:string
         }?

      }
   )
EOF

$ spud-preprocess foo.rnc
$ jing foo.rng
foo.rng:4:28: error: group of "string" or "data" element

xmllint also complains

$ xmllint --relaxng foo.rng >/dev/null
foo.rng:4: element element: Relax-NG parser error : Element format has a content type error
Relax-NG schema foo.rng failed to compile

I'm not sure what the correct definition here was meant to be, maybe:

      element format {
         attribute name {"triangle"},
         element comment {
            xsd:string
         }?

Related branches

Revision history for this message
Cian Wilson (cwilson) wrote :

I'd agree that "triangle" should be an name attribute, this would bring it into line with the mesh format options under geometry/mesh, which I'm guessing this was meant to emulate.

You'll need to change the code at assemble/Adapt_State_Prescribed.F90:109 from:
call get_option(base_path // "/mesh/from_file/format", format)
to:
call get_option(base_path // "/mesh/from_file/format/name", format)
though.

That format variable doesn't then actually seem to get used anywhere mind you but get_option will still throw an error if it can't find it.

Changed in fluidity:
status: New → Fix Committed
Tim Bond (timothy-bond)
Changed in fluidity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.