Giter Club home page Giter Club logo

Comments (6)

schierlm avatar schierlm commented on June 24, 2024 1

In my opinion the \ide tag is only valid in USFM, and not in USX or USFX.

The system should also behave as such:

  • When converting from USFM, text is read accordingly
  • When converting to USFM, \ide UTF-8 is written and the file is written as UTF-8
  • Neither USFX nor USX formats have any special logic concerning the \ide tag.

The only path where I am unsure is when you use ParatextConverter to convert USFM to one of the other Paratext formats. In that case, ide tag gets stored in the book attributes and may (did not verify this though) be written out to other Paratext formats. Pinging @Rolf-Smit as he overhauled the USFX/USX support in commit 891a996, which probably introduced this change.

from biblemulticonverter.

schierlm avatar schierlm commented on June 24, 2024 1

Thank you for confirming my suspicion.

@Rolf-Smit, do you remember why you added the '\ide` tag to the book attributes?

If not, I'll remove it (and the check to avoid writing it out for USFM export in

if (!attr.getKey().equals("ide")) {
bw.write("\n\\" + attr.getKey() + " " + escape(attr.getValue(), false));
}
as well).

from biblemulticonverter.

shadow-light avatar shadow-light commented on June 24, 2024

Yes that was my thinking, but when converting from USFM to USX using ParatextConverter the ide is getting written out as a para element:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<usx version="3.0"><book code="1CH" style="id">World English Bible (WEB)</book>
  <para style="ide">UTF-8</para>
  <para style="h">1 Chronicles</para>
  <para style="toc1">The First Book of Chronicles</para>

I'm simply ignoring it now when converting to HTML but it might be good to get rid of in case future projects get stuck trying to parse it.

from biblemulticonverter.

Rolf-Smit avatar Rolf-Smit commented on June 24, 2024

@schierlm I don't remember why it was added. Maybe it was to preserve the original encoding? But that doesn't make sense anyways, since USFM is always written out as UTF-8 and other formats like USX must be written in UTF-8.

I would say, remove it.

from biblemulticonverter.

shadow-light avatar shadow-light commented on June 24, 2024

Thanks!

from biblemulticonverter.

shadow-light avatar shadow-light commented on June 24, 2024

It turns out apparently it is valid. I discovered that not all elements are documented but can still be found in the schema: https://github.com/ubsicap/usx/blob/master/schema/usx.rng

ide is there, but as we discussed it doesn't really have any value as encoding is handled at the XML level, and if you want to convert back to USFM you could potentially choose whatever encoding you liked.

(no action needed, just thought I'd document this for future readers)

from biblemulticonverter.

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.