You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2020/05/01 17:53:00 UTC

[jira] [Created] (DAFFODIL-2336) Allow control over BLOB identifier

Steve Lawrence created DAFFODIL-2336:
----------------------------------------

             Summary: Allow control over BLOB identifier
                 Key: DAFFODIL-2336
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2336
             Project: Daffodil
          Issue Type: Bug
          Components: Back End
            Reporter: Steve Lawrence


Currently the blob feature generates a temp file with a random name and an optional API-provided prefix/suffix that is common among all blobs generated during a parse. However, in some cases, it might be useful for the schema author to have some control over the name of this file.

As an eample, a tar file is essentialy a container format that includes a file name and a blob. It might be useful for the blobs to be written to a file with the same name as defined by the tar. Thus, we could do something like this:

{code:xml}
<xs:element name="file" type="xs:anyURI" dfdlx:objectKind="bytes" dfdlx:objectIdentifier="{ ../filename }" />
{code:xml}

This dfdlx:objectIdentifier would be evaluated and used when creating the blob file.

One could also image this useful if a container format contained mime information about a blob. One could then query this mime information and apply the appropriate extension for the blob. This way handlers of these blobs do not necessarily need to query the infoset and know where to look to determine basic information about the blob, but could instead use this identifer information.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)