Skip to content

Missing QName value in Json Document properties  #266

Closed
@georgeajit

Description

@georgeajit

A Java test case inserts QName for a JSON document and then reads back the properties. Here is the snippet of that test case.

I am seeing difference between 7.0 (b2_0) and 8.0 (b3_0) when properties are read back and checked for ns. I checked with Sam and he is not aware of this issue.

After talking with Erik, decided to assign this issue to Erik.

// put metadata
metadataHandle.getProperties().put(new QName("http://www.example.com", "foo"), "bar");
// write the doc with the metadata
writeDocumentUsingOutputStreamHandle(client, filename, "/write-json-outputstreamhandle-metadata/", metadataHandle, "JSON");
// create handle to read metadata
DocumentMetadataHandle readMetadataHandle = new DocumentMetadataHandle();
// read metadata
readMetadataHandle = readMetadataFromDocument(client, "/write-json-outputstreamhandle-metadata/" + filename, "JSON");
// get metadata values
DocumentProperties properties = readMetadataHandle.getProperties();
// Properties
String expectedProperties = "size:1|{http://www.example.com}foo:bar|";
String actualProperties = getDocumentPropertiesString(properties);

In 7.0 Query Console I see the example.com NS missing. Has something changed? The test is looking for example.com to be present.

From 7.0 Query Console:

<?xml version="1.0" encoding="UTF-8"?>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
<foo xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
bar
</foo>
</prop:properties>

From 8.0 Query Console:

<?xml version="1.0" encoding="UTF-8"?>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
  <foo xsi:type="xs:string" xmlns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">bar</foo>
</prop:properties>

This is a minor issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions