Coder Social home page Coder Social logo

Comments (5)

 avatar commented on May 24, 2024

Fwiw, there is now a Travis check against such IDs, so most of our documents are now checked for this.

from geekodoc.

 avatar commented on May 24, 2024

Maybe it is not such a good idea to do that in the schema and the Travis-based solution is better suited for this issue anyway because it is less fix than the schema and because we'd immediately invalidate a ton of existing documents that validated before.

I almost think we should close this one. @tomschr ?

from geekodoc.

tomschr avatar tomschr commented on May 24, 2024

@sknorr

I can understand that it gives mixed feelings (because it invalidates valid documents). Same with me. 😉 Mabye we should discuss this personally. I provide some thoughts.

Nevertheless, I think it is a good idea. I run into the trap with one of my files and asking myself what I did wrong. I found it later in Travis. IMHO, I think, we shouldn't have two validations which exists in parallel: a local one and a remote one in Travis. IMHO both must report the same (there may be valid exception to this rule). So faster reporting of such errors is a good thing.

On the other side, I see the problem with former documents. With this change they may be invalid now. This is probably a bad thing. However, we could do:

  • Raise the major version of Geekodoc to indiciate, there is an incompatible change.
  • Communicate the change on doku-intern, get feedback, raise awareness etc.
  • Write a conversation script (XSLT, bash, ...) which converts all attribute values of xml:id and linkend. Didn't you do that already?

We could also deal with this change on a packaging level. For example, we could introduce a geekodoc2 package which could co-exist with the (now) old geekodoc. Same like with DocBook 4.x and 5.x. They all co-exist peacefully.

I would suggest, let's discuss this in person (faster, easier). 👍

from geekodoc.

tomschr avatar tomschr commented on May 24, 2024

Revisiting this issue in the light of openSUSE/daps#566. To use the ID checks in Travis this can be replicated in GeekoDoc as well.
Tested it with this snippet of RNC code:

include "docbookxi.rnc"
{
   db.xml.id.attribute =
     ## Identifies the unique ID value of the element
     attribute xml:id {
      xsd:ID  { pattern = "[\-a-zA-Z0-9]+" } }
}

It validates an xml:id of foo-bar successfully with jing, but not foo.bar.

from geekodoc.

 avatar commented on May 24, 2024

That is imo definitely a better solution than using DAPS itself for this purpose, thanks. Regex looks good too (though I wonder if the leading \ in the character set is necessary -- but maybe that is necessary because the RNG regex syntax is a bit weird).

from geekodoc.

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.