Skip to content

XML Literal is going very wrong for some reason. #26

Open

Description

@shellac

Simpleparse and web service both produce nonsense:

<html xmlns:rdfs= "http://www.w3.org/2000/01/rdf-schema#" xmlns="http://www.w3.org/1999/xhtml">
<body>
    <p id='#xy' about='#xy' property='rdfs:label'>
    <em rel='skos:subject' resource='[dbpc:Software]'>THIS</em>
        is my SW-label
    </p>
</body>
</html>

I strongly suspect an xml library issue.

Activity

  1. shellac commented on Jun 17, 2010

    @shellac
    OwnerAuthor

    First <fake ..> removal is broken.

    Second, it's caused by the lack of a namespace context.

    If I hack in the evalcontext tests fail since it doesn't change once an xml literal is collected (rdfa parsing stops).

    Needs some thought...

  2. shellac commented on Jun 17, 2010

    @shellac
    OwnerAuthor

    I could make a fake one, and set the requisite bits? If I see {svg uri}svg I can set the svg prefix, since I'm passed that too (iirc)

  3. shellac commented on Jun 17, 2010

    @shellac
    OwnerAuthor

    Aha, it seems that the unprefixed rel is the issue. I'm getting no namespace uri for it, and that seems to be the problem. The outputter is trying to set default namespace to "" as a result. Chaos!

    Feels like it might be a bug in the xml library?

  4. shellac commented on Jun 21, 2010

    @shellac
    OwnerAuthor

    Moved web service to use woodstox.

    Tempted to close with 'use woodstox', but I'm sure there must be a better way...

  5. Pyppe commented on Dec 14, 2010

    @Pyppe

    Is there a fix for this? We're using java-rdfa-0.4.1.jar and are experiencing the same problem. 0.4.1 was apparently created 2010-06-30 so shouldn't that fix this issue (basing this on your previous comment that was posted 2010-06-21)?

    As a recap, here's the problem:

    This is example.

    java-rdfa parses this as:
    <foo:xml_description rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">xmlns=""&gt;&lt;span xmlns="http://www.w3.org/1999/xhtml"&gt;This is example.</span>/fn:xml_description

    NOTE: Valid namespaces etc. were removed from the above-mentioned examples for the sake of simplicity.

    Any suggestions?

    Thanks!

  6. shellac commented on Dec 14, 2010

    @shellac
    OwnerAuthor

    Are you using woodstox? I've found StAX output varied depending on the library. Drives me batty :-(

  7. Pyppe commented on Dec 15, 2010

    @Pyppe

    I wasn't (I assumed newest java-rdfa would have used it automagically... of course, this wasn't the case, because I had not included woodstox jars in classpath).

    Indeed, woodstox solves the problem. I guess I'm then adding (yet again) a couple of new libraries into the application. It's crazy how differently all the "standard compliant" XML/XSL/SAX etc. libraries operate. And how one solves issues just by adding a stack of jars within your application (and not touching your code at all). o_O

    I was first planning to solve this "manually" by iterating the statements of the output Jena-model, and modified the XmlLiteral values... but I guess I'll stick with woodstox for now.

    Thanks, again, for your insight!

  8. added a commit that references this issue on Jan 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions