Skip to content

A test dmr that cannot be validated against the schema (and maybe should not be) #5

@Mikejmnez

Description

@Mikejmnez

The following .dmr fails to be validated by the current schema:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Dataset xmlns="http://xml.opendap.org/ns/DAP/4.0#" dapVersion="4.0" dmrVersion="1.0" name="AtributesFile.nc">
    <Attribute name="_ChunkSizes" type="UInt32">
        <Value value="1"/>
        8763412
        <Value value="964"/>
        <Value>9674774</Value>
    </Attribute>
</Dataset>

The issue is the value 8763412 defined as simple text. The traceback is:

>   ???
E   lxml.etree.DocumentInvalid: Element '{http://xml.opendap.org/ns/DAP/4.0#}Attribute': Character content other than whitespace is not allowed because the content type is 'element-only'., line 3

src/lxml/etree.pyx:3813: DocumentInvalid
============================================================================= short test summary info =============================================================================
FAILED tests/test_validate_dmrs.py::test_valid_dmrs[dmr_file7] - lxml.etree.DocumentInvalid: Element '{http://xml.opendap.org/ns/DAP/4.0#}Attribute': Character content other than whitespace is not allowed because the content type is 'element-only'., line 3

Removing that text (8763412) results in a valid DMR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions