Skip to content

Dap4 serialization patch#354

Closed
ndp-opendap wants to merge 6 commits into
masterfrom
dap4-serialization-patch
Closed

Dap4 serialization patch#354
ndp-opendap wants to merge 6 commits into
masterfrom
dap4-serialization-patch

Conversation

@ndp-opendap

Copy link
Copy Markdown
Contributor

No description provided.

@jgallagher59701 jgallagher59701 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should try the change we talked about . I added a comment about where and how you could do this.

Comment thread DMR.cc
if (xmlTextWriterWriteAttribute(xml.get_writer(), (const xmlChar *)"dmrVersion",
(const xmlChar *)dmr_version().c_str()) < 0)
throw InternalErr(__FILE__, __LINE__, "Could not write attribute for dapVersion");
throw InternalErr(__FILE__, __LINE__, "Could not write attribute for dmrVersion");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your idea to make the 'serialization = ...' XML attribute a function of the response - and resetting the 'dmrVersion' XML attribute to 1.0. This would mean that a DMR response does not have the 'serialization' attribute and uses 'dmrVersion = 1.0'. Then for the DAP response, the "DMR Part" does have the 'serialization' attribute and has the 'dmrVersion = 1.0'.

If you're going to do that, this would nominally be the place and and you could do that by adding a third parameter. You could keep this existing method by making the two parameter version call the new three parameter version (thus maintaining ABI of this class).

@ndp-opendap ndp-opendap linked an issue Apr 14, 2026 that may be closed by this pull request
1 task
…e DMR.

I have elided any state regarding in the DMR, DDS, and D4ParserSax2 because there is no point ti holding the state. The code always performs the DAP4 seialization the correct way, and never the old way. The flag is only for consuming clients.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add serialization version flag to the Dataset element in the DMR part of a DAP4 Data Response.

2 participants