Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML doesn't round-trip #44

Open
retorquere opened this issue Jul 14, 2017 · 0 comments
Open

XML doesn't round-trip #44

retorquere opened this issue Jul 14, 2017 · 0 comments

Comments

@retorquere
Copy link

This input:

<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <Description about="urn:mozilla:install-manifest">
    <em:description>Make Zotero useful for us LaTeX holdouts.</em:description>
    <em:id>[email protected]</em:id>
    <em:name>Zotero Better Bib(La)Tex</em:name>
    <em:version>SOURCE</em:version>
    <em:homepageURL>https://github.com/retorquere/zotero-better-bibtex/wiki</em:homepageURL>
    <em:creator>Emiliano Heyns</em:creator>
    <em:iconURL>chrome://zotero-better-bibtex/skin/better-bibtex.svg</em:iconURL>
    <em:updateURL>https://retorquere.github.io/zotero-better-bibtex/update.rdf</em:updateURL>
    <em:type>2</em:type> <!-- type=extension -->
    <em:optionsURL>chrome://zotero/content/preferences/preferences.xul#better-bibtex</em:optionsURL>

    <!-- Requires Firefox or Zotero Standalone -->
    <em:targetApplication>
      <Description>
        <em:id>[email protected]</em:id>
        <em:minVersion>5.0</em:minVersion>
        <em:maxVersion>5.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>
    <em:targetApplication>
      <Description>
        <em:id>[email protected]</em:id>
        <em:minVersion>5.0</em:minVersion>
        <em:maxVersion>5.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>
  </Description>
</RDF>

when put through stringToJs/jsToString outputs

<RDF 
  xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns:em="http://www.mozilla.org/2004/em-rdf#">
  <Description about="urn:mozilla:install-manifest">
    <em:description 
      xmlns:em="http://www.w3.org/1999/02/22-rdf-syntax-ns#">Make Zotero useful for us LaTeX holdouts.
    </em:description>
    <em:id>[email protected]</em:id>
    <em:name>Zotero Better Bib(La)Tex</em:name>
    <em:version>5.0.0</em:version>
    <em:homepageURL>https://github.com/retorquere/zotero-better-bibtex/wiki</em:homepageURL>
    <em:creator>Emiliano Heyns</em:creator>
    <em:iconURL>chrome://zotero-better-bibtex/skin/better-bibtex.svg</em:iconURL>
    <em:updateURL>https://retorquere.github.io/zotero-better-bibtex/update.rdf</em:updateURL>
    <em:type>2</em:type>
    <em:optionsURL>chrome://zotero/content/preferences/preferences.xul#better-bibtex</em:optionsURL>
    <em:targetApplication>
      <Description>
        <em:id>[email protected]</em:id>
        <em:minVersion>5.0</em:minVersion>
        <em:maxVersion>5.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>
    <em:targetApplication>
      <Description>
        <em:id>[email protected]</em:id>
        <em:minVersion>5.0</em:minVersion>
        <em:maxVersion>5.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>
  </Description>
</RDF>

notice the extra namespace declaration on em:description

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

No branches or pull requests

1 participant