Giter Site home page Giter Site logo

Comments (6)

jelovirt avatar jelovirt commented on June 12, 2024

Which DITA-OT version and how was it run. If I mock a test case like that and run it with 4.2 on the command line, I get

Error: file:/Volumes/tmp/src/topic.dita:3:17: Attribute value "%50" of type ID must be an NCName when namespaces are enabled.

from dita-ot.

jelovirt avatar jelovirt commented on June 12, 2024

The message content comes from SAXException thrown by the XML parser. In order to get some message ID to the message, we could add a generic parsing message that doens't have a <reason> other than the message text from the XML parser.

from dita-ot.

raducoravu avatar raducoravu commented on June 12, 2024

So if I run DITA OT 4.2 on Windows on a DITA Map which contains a topic like this:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">

<topic id="%50">
    
<title>Introduction</title>

</topic>


the command line I run and the error look like this (notice no [Error:] marker before the reported error):

"C:\Users\radu_coravu\Downloads\dita-ot-4.2/bin/dita.bat" -f html5 -o D:\samples\dita\flowers/out/html5 -t D:\samples\dita\flowers/temp/html5 -i D:\samples\dita\flowers\flowers.ditamap
file:/D:/samples/dita/flowers/topics/introduction.dita:3:17: Attribute value "%50" of type ID must be an NCName when namespaces are enabled.

from dita-ot.

raducoravu avatar raducoravu commented on June 12, 2024

On Mac OS indeed there is an "Error:" marker with a red foreground when running about the same command.

from dita-ot.

jelovirt avatar jelovirt commented on June 12, 2024

Ok, so this is a case where on Windows the CLI doesn't use colours in the log and the prefix is missing. I'll open a PR to make sure the prefixes are output on Windows too.

from dita-ot.

raducoravu avatar raducoravu commented on June 12, 2024

@jelovirt yes, also when the -no-colors flag is used the prefix should be output as well.

from dita-ot.

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.