Git Product home page Git Product logo

Set attributes for properties, e.g. `<title xml:lang="eng">` about eml HOT 3 CLOSED

peterdesmet avatar peterdesmet commented on June 19, 2024
Set attributes for properties, e.g. ``<p>from eml.</p></section> </section> </article> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-7917632214101949" data-ad-slot="6627871389" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <article> <h2 class="h2">Comments (3)</h2> <section class="issue-comment"> <section id="1113818400" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/766407?v=4" alt="mbjones avatar" /> <a class="issue-username" href="/mbjones">mbjones</a> <span class="issue-time"> commented on June 19, 2024 </span> <span class="issue-vote"> <i class="icon-vote"></i>1 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/peterdesmet/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/peterdesmet">@peterdesmet</a> I think this is different from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1210024301" data-permission-text="Title is private" data-url="https://github.com/ropensci/EML/issues/338" data-hovercard-type="issue" data-hovercard-url="/ropensci/EML/issues/338/hovercard" href="https://github.com/ropensci/EML/issues/338">#338</a>, which addresses attributes inside of <code class="notranslate">additionalMetadata</code>, which is handled differently from the rest of the EML schema. The <code class="notranslate">@directory</code> attribute is a standard part of the EML schema on the <code class="notranslate">userId</code> elelment and should be able to be set without a problem. We use it exactly as you described in our documents in the Arctic Data Center (it is recommended best practice for ORCIDs). The one difference is that DataONE, LTER, and other networks have converged on using the full ORCID in the userId value. Here's an example with <code class="notranslate">directory</code> set correctly:</p> <div class="highlight highlight-source-r notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="me <- list( individualName = list( givenName = "Peter", surName = "Desmet"), userId = list( directory="https://orcid.org/", 'https://orcid.org/0000-0002-8442-8025')) eml <- list(dataset = list( title = "dataset title", contact = me, creator = me), system = "doi", packageId = "10.xxx") doc <- as_emld(eml) eml_validate(doc)"><pre class="notranslate"><span class="pl-smi">me</span> <span class="pl-k"><-</span> <span class="pl-k">list</span>( <span class="pl-v">individualName</span> <span class="pl-k">=</span> <span class="pl-k">list</span>( <span class="pl-v">givenName</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>Peter<span class="pl-pds">"</span></span>, <span class="pl-v">surName</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>Desmet<span class="pl-pds">"</span></span>), <span class="pl-v">userId</span> <span class="pl-k">=</span> <span class="pl-k">list</span>( <span class="pl-v">directory</span><span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">"</span>https://orcid.org/<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">'</span>https://orcid.org/0000-0002-8442-8025<span class="pl-pds">'</span></span>)) <span class="pl-smi">eml</span> <span class="pl-k"><-</span> <span class="pl-k">list</span>(<span class="pl-v">dataset</span> <span class="pl-k">=</span> <span class="pl-k">list</span>( <span class="pl-v">title</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>dataset title<span class="pl-pds">"</span></span>, <span class="pl-v">contact</span> <span class="pl-k">=</span> <span class="pl-smi">me</span>, <span class="pl-v">creator</span> <span class="pl-k">=</span> <span class="pl-smi">me</span>), <span class="pl-v">system</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>doi<span class="pl-pds">"</span></span>, <span class="pl-v">packageId</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>10.xxx<span class="pl-pds">"</span></span>) <span class="pl-smi">doc</span> <span class="pl-k"><-</span> as_emld(<span class="pl-smi">eml</span>) eml_validate(<span class="pl-smi">doc</span>)</pre></div><p>from eml.</p></section> </section> <section class="issue-comment"> <section id="1113560939" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/600993?v=4" alt="peterdesmet avatar" /> <a class="issue-username" href="/peterdesmet">peterdesmet</a> <span class="issue-time"> commented on June 19, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">Ha, I see this is a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1210024301" data-permission-text="Title is private" data-url="https://github.com/ropensci/EML/issues/338" data-hovercard-type="issue" data-hovercard-url="/ropensci/EML/issues/338/hovercard" href="https://github.com/ropensci/EML/issues/338">#338</a>. Closing here.</p><p>from eml.</p></section> </section> <section class="issue-comment"> <section id="1113956899" class="issue-head"> <img class="issue-avatar" src="https://avatars.githubusercontent.com/u/600993?v=4" alt="peterdesmet avatar" /> <a class="issue-username" href="/peterdesmet">peterdesmet</a> <span class="issue-time"> commented on June 19, 2024 </span> </section> <section class="markdown markdown-js p-5"><p dir="auto">Oh excellent! Thanks!</p><p>from eml.</p></section> </section> </article> <section> <h2 class="h2">Related Issues (20)</h2> <div class="issue"> <ul> <li> <a href="/ropensci/eml/issues/324">set_attributes forces all numeric fields to have storageType = "float"</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 7</span> </li> <li> <a href="/ropensci/eml/issues/327">Taxonomic Coverage and bibtex</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/ropensci/eml/issues/328">Species name epithet is not handled the way specified in the EML schema</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/ropensci/eml/issues/330">Error with molePerKilogram in unit list returned by get_unitList() </a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 3</span> </li> <li> <a href="/ropensci/eml/issues/331">dataset and datatable entries from README example fail</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/ropensci/eml/issues/332">`shiny_attributes` performance improvments</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 8</span> </li> <li> <a href="/ropensci/eml/issues/334">Revisit how users can find a learn to use the `eml$*` constructors</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/ropensci/eml/issues/335">Add a minimum version requirement on taxadb and wait to release the next version of this package</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/ropensci/eml/issues/337">Web scraping | sapply function | Error in readBin(5L, "raw", 65536L) : Failure when receiving data from the peer</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/ropensci/eml/issues/338">Creating EML elements with XML attributes</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/ropensci/eml/issues/339">Duplicate person when using `write_eml()`</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> <li> <a href="/ropensci/eml/issues/341">Function to convert DataCite metadata to EML: good fit for this package?</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 7</span> </li> <li> <a href="/ropensci/eml/issues/342">`<![CDATA[` not always recognized</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/ropensci/eml/issues/343">[Units] Discussion about current unit list</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 5</span> </li> <li> <a href="/ropensci/eml/issues/344">`set_coverage()`: Express common names in `commonName` in `taxonomicCoverage`</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 10</span> </li> <li> <a href="/ropensci/eml/issues/345">`set_responsibleParty()`: allow to create organization parties</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/ropensci/eml/issues/347">namespace conflict introduced when importing/exporting EML generated under older schema</a> </li> <li> <a href="/ropensci/eml/issues/348">EML::eml_validate conflicts with knb.ecoinformatics.org parser & appears to introduce invalid xml into valid files</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 1</span> </li> <li> <a href="/ropensci/eml/issues/349">EML seems to have trouble with foreign key constraints</a> <span class="text-red-600 text-xs font-normal py-0.5 px-1 border border-red-600 rounded-md">HOT 2</span> </li> </ul> </div> </section> </main> <section id="more" class="flex-none w-full md:w-60 text-gray-600 bg-gray-50 px-5 md:px-3 rounded-md dark-color"> <div class="w-full md:w-60 h-0.5"></div> <section> <!-- recommend projects --> <h2 class="h2 py-3.5">Recommend Projects</h2> <ul> <li class="mb-4"> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/facebook/react"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://raw.githubusercontent.com/facebook/create-react-app/master/packages/cra-template/template/public/logo192.png" alt="React photo" /> React </a> </h3> <p class="article-more pt-1">A declarative, efficient, and flexible JavaScript library for building user interfaces.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/vuejs/vue"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/c8f91d18976e27123643a926a2588b8d931a0292fd0b6532c3155379e8591629/68747470733a2f2f7675656a732e6f72672f696d616765732f6c6f676f2e706e67" alt="Vue.js photo" /> Vue.js </a> </h3> <p class="article-more pt-1">🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/microsoft/TypeScript"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://www.typescriptlang.org/favicon-32x32.png" alt="Typescript photo" /> Typescript </a> </h3> <p class="article-more pt-1">TypeScript is a superset of JavaScript that compiles to clean JavaScript output.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/tensorflow/tensorflow"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/c04e16c05de80dadbdc990884672fc941fdcbbfbb02b31dd48c248d010861426/68747470733a2f2f7777772e74656e736f72666c6f772e6f72672f696d616765732f74665f6c6f676f5f736f6369616c2e706e67" alt="TensorFlow photo" /> TensorFlow </a> </h3> <p class="article-more pt-1">An Open Source Machine Learning Framework for Everyone</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/django/django"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars2.githubusercontent.com/u/27804?s=200&v=4" alt="Django photo" /> Django </a> </h3> <p class="article-more pt-1">The Web framework for perfectionists with deadlines.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/laravel/laravel"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://laravel.com/img/logomark.min.svg" alt="Laravel photo" /> Laravel </a> </h3> <p class="article-more pt-1">A PHP framework for web artisans</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/d3/d3"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://camo.githubusercontent.com/586ccf0aad9684edc821658cee04146cf36d1f1d5ec904bbefd72728909ccb2e/68747470733a2f2f64336a732e6f72672f6c6f676f2e737667" alt="D3 photo" /> D3 </a> </h3> <p class="article-more pt-1">Bring data to life with SVG, Canvas and HTML. 📊📈🎉</p> </article> </li> <li> <div> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-7917632214101949" data-ad-slot="6627871389" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </li> </ul> </section> <section> <!-- recommend topics --> <h2 class="h2 py-3.5">Recommend Topics</h2> <ul> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/javascript"> javascript </a> </h3> <p class="article-more pt-1">JavaScript (JS) is a lightweight interpreted programming language with first-class functions.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/web"> web </a> </h3> <p class="article-more pt-1">Some thing interesting about web. New door for the world.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/server"> server </a> </h3> <p class="article-more pt-1">A server is a program made to process requests and deliver data to clients.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/machine-learning"> Machine learning </a> </h3> <p class="article-more pt-1">Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/visualization"> Visualization </a> </h3> <p class="article-more pt-1">Some thing interesting about visualization, use data art</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/topic/game"> Game </a> </h3> <p class="article-more pt-1">Some thing interesting about game, make everyone happy.</p> </article> </li> <li> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-7917632214101949" data-ad-slot="6627871389" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </li> </ul> </section> <section> <!-- recommend users --> <h2 class="h2 py-3.5">Recommend Org</h2> <ul> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/facebook"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/69631?v=4" alt="Facebook photo" /> Facebook </a> </h3> <p class="article-more pt-1">We are working to build community through open source technology. NB: members must have two-factor auth.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/microsoft"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/6154722?v=4" alt="Microsoft photo" /> Microsoft </a> </h3> <p class="article-more pt-1">Open source projects and samples from Microsoft.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/google"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1342004?v=4" alt="Google photo" /> Google </a> </h3> <p class="article-more pt-1">Google ❤️ Open Source for everyone.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/alibaba"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1961952?v=4" alt="Alibaba photo" /> Alibaba </a> </h3> <p class="article-more pt-1">Alibaba Open Source for everyone</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/d3"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/1562726?v=4" alt="D3 photo" /> D3 </a> </h3> <p class="article-more pt-1">Data-Driven Documents codes.</p> </article> </li> <li> <article class="small-box"> <h3 class="article-title"> <a class="block break-all" href="/tencent"> <img loading="lazy" class="inline-block w-6 h-6 rounded-md border border-white" width="24" height="24" src="https://avatars.githubusercontent.com/u/18461506?v=4" alt="Tencent photo" /> Tencent </a> </h3> <p class="article-more pt-1">China tencent open source team.</p> </article> </li> <li> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-7917632214101949" data-ad-slot="6627871389" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </li> </ul> </section> </section> </div> </div> <!-- footer --> <footer class="sizeing text-xs text-center p-5"> <div>Friends: <a class="hover:underline" target="_blank" href="https://www.chanpinqingbaoju.com">ProductDiscover</a> </div> Copyright © 2024 Git Product <!-- & <span class="block md:inline">Data Power by github.com</span> --> ❤️ <a class="hover:underline block md:inline" href="mailto:cs.victor.edison@gmail.com">Mail to me</a> </footer> </body> </html>