Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-103

FmtUtils does not expand xsd prefix

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • ARQ
    • *

    Description

      A call to FmtUtils#stringForNode(literalNode) with literalNode equals to Node.createLiteral("9", null, XSDDatatype.XSDint) returns "9"^xsd:int whereas "9"^http://www.w3.org/2001/XMLSchema#int is expected.

      I have set the issue as minor because it is currently possible to solve the issue by using the new OutputLangUtils class which returns the right value. However this imply to write several lines to get the output as a String:

      StringWriter sw = new StringWriter();
      OutputLangUtils.output(sw, object, null);
      new String(sw.getBuffer());

      Maybe, a solution would be to rewrite FmtUtils by using OutputLangUtils? Thus, FmtUtils will be useful to format Nodes as String and only OutputLangUtils has to be maintained.

      Attachments

        Activity

          People

            andy Andy Seaborne
            laurent.pellegrino Laurent Pellegrino
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: