Git Product home page Git Product logo

Comments (7)

jhudsoncedaron avatar jhudsoncedaron commented on July 29, 2024 1

Incidentally I am the author of this part of "Cedaron.FormBuilder.Presentation".

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

The application "Cedaron.FormBuilder.Presentation" created this file and the ODF Toolkit seems to be surprised by the default namespace in the /META-INF/manifest.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" version="1.2">
 <file-entry full-path="/" version="1.2" media-type="application/vnd.oasis.opendocument.spreadsheet"/>
 <file-entry full-path="mimetype" media-type="text/plain"/>
 <file-entry full-path="meta.xml" media-type="text/xml"/>
 <file-entry full-path="content.xml" media-type="text/xml"/>
 <file-entry full-path="styles.xml" media-type="text/xml"/>
</manifest>

This was obviously unexpected and strangely this missing feature (bug) has not happened earlier.

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

@jhudsoncedaron I started fixing it but your manifest has also attributes without prefix and the default namespace does not work on attributes.
See default namespace it states:
"The namespace name for an unprefixed attribute name always has no value."

Therefore, in your /META-INF/manifest.xml file it should be written:

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" version="1.2" xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
 <file-entry manifest:full-path="/" version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
 <file-entry manifest:full-path="mimetype" manifest:media-type="text/plain"/>
 <file-entry manifest:full-path="meta.xml" manifest:media-type="text/xml"/>
 <file-entry manifest:full-path="content.xml" manifest:media-type="text/xml"/>
 <file-entry manifest:full-path="styles.xml" manifest:media-type="text/xml"/>
</manifest>

from odftoolkit.

jhudsoncedaron avatar jhudsoncedaron commented on July 29, 2024

And that's why I can't quite depend on whether Calc complains or not.

from odftoolkit.

jhudsoncedaron avatar jhudsoncedaron commented on July 29, 2024

I'm confused. You posted a corrected manifest.xml with a manifest: namespace reference that isn't declared by any xmlns:manifest.

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

Yes, I tried to fix it manually and have not validated it, still did not, only want to show the attributes.
At least, I added now the manifest namespace.

Meanwhile, I have asked the ODF co-editors and Francis Cave pointed me to XML myth#4 in regard of attribute namespaces: https://www.xml.com/pub/a/2000/03/08/namespaces/myth1.html

Yes, better use the validator to see if a document is valid. The ability to open broken documents is often part of the usability of an application. Students loved already in the last century StarOffice (LO ancestor) as it could open DOC documents when Word refused to open them. ;-)

Are you aware, that I have added an HTML version of the RNG grammar to the ODF 1.3 deliverables of OASIS:
https://docs.oasis-open.org/office/OpenDocument/v1.3/csd03/schemas/OpenDocument-v1.3-manifest-schema-rng.html#file-entry-attlist
This eases the handling of the grammar a bit.

from odftoolkit.

svanteschubert avatar svanteschubert commented on July 29, 2024

In both two SAX ContentHandler odf DOM it will now be checked in case there is an XML namespace if localName and qualifiedName (qName = prefix+localName) are identical.
If this is the case a new method is being added to create an OdfName with a localName, instead of a qName. OdfNamespace can now be created without a namespace prefix but will try to take the default prefix given by the ODF Specification as a fall-back.

from odftoolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.