Skip to content

BCFTopics.export: three BCF-XML 3.0 conformance deviations (extensions file name, VersionId value, Topic child order) #760

Description

@Cmillkon

Found while conformance-testing exported archives against the BCF-XML 3.0 schemas (release_3_0). All three verified in the published bundle of @thatopen/components@3.4.6 (dist/index.mjs); line refs below are from that file.

1. Extensions written as bcf.extensions — spec requires extensions.xml

export() writes zip.file("bcf.extensions", this.serializeExtensions()) (~line 19528). BCF 3.0 requires the file to be named extensions.xml at archive root (an empty <Extensions/> is valid). Strict readers that resolve the required file by name will not find it.

2. bcf.version VersionId serialized as "3" — spec examples use "3.0"

The template writes VersionId="${this.config.version}" with the BCFVersion type value "3". The official 3.0 test files and documentation use VersionId="3.0". Clients doing exact-match version detection mis-detect the archive.

3. Topic children serialized as CreationAuthor before CreationDate — xs:sequence violation

Topic.serialize() builds the element list from an object literal with CreationAuthor before CreationDate (~lines 19042-19043). markup.xsd defines the Topic child order as xs:sequence (… Labels, CreationDate, CreationAuthor, ModifiedDate …), so schema-validating consumers reject the markup. This is the deviation most likely to break real interop.

Repro

const bcf = components.get(OBC.BCFTopics);
bcf.setup({ version: '3' });
bcf.create({ title: 'x' });
const blob = await bcf.export();
// unzip → entry names + markup.bcf child order

Validate markup.bcf against https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Schemas — fails on (3); (1) fails the required-file check; (2) fails strict VersionId matching.

Happy to provide the archive or a PR if useful. Thanks for the engine!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions