Skip to content

Omitting xmlns in parsed literals with rdf:HTML datatype #66

@csarven

Description

@csarven

When the parser encounters:

<p ... datatype="rdf:HTML"><span>foo</span></p>

The value comes out as

<span xmlns="http://www.w3.org/1999/xhtml"></span>

Is it possible to omit the xmlns in the output so that the value is "as is": <span>foo</span>?

We used the features option when initialising RdfaParser:

features: {
  xmlnsPrefixMappings: false,
}

but that seemed to strip out all of the markup. Not sure if that flag was right to begin with but that approach also seems to override all of the default settings (which seems to be true).

So:

  • Is it possible to omit the xmlns namespace? If not, is this something that can only be done post-parsing?
  • Is it possible to override one of the features?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions