Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow creation and deletion of Entity Declaration elements #174

Closed
jsjuni opened this issue Nov 24, 2009 · 5 comments
Closed

allow creation and deletion of Entity Declaration elements #174

jsjuni opened this issue Nov 24, 2009 · 5 comments

Comments

@jsjuni
Copy link

jsjuni commented Nov 24, 2009

I'm writing a utility to rewrite URIs in some RDF/XML files. This behavior is suprising:

$ irb -r nokogiri
irb(main):001:0> doc = Nokogiri::XML::Document.new
=> #<Nokogiri::XML::Document:0x..fdbbf990a name="document">
irb(main):002:0> ed = Nokogiri::XML::EntityDecl.new('ed', doc)
=> #<Nokogiri::XML::EntityDecl:0x..fdbbf1dea "<ed/>">
irb(main):003:0> ed.content
=> nil
irb(main):004:0> ed.content = 'test'
=> "test"
irb(main):005:0> ed.content
=> nil

That's not what's intended, is it?

@jsjuni
Copy link
Author

jsjuni commented Nov 24, 2009

The markdown doesn't preserve my line breaks; hope the problem is clear.

@flavorjones
Copy link
Member

I'd like to undefine "content=" for the EntityDecl class. GDOME2 and libxml2 treat entity declarations as read-only elements, and so it's non-trivial for Nokogiri to support modification.

However, it seems like the non-implementation of "content=" isn't the root cause for your request. Correct me if I'm wrong, but what you're trying to do is construct new entity declarations and add them to a new document. Is this correct?

Nokogiri currently has no support for the creation of new entity declarations. If this is what you're asking for, please respond in this ticket.

@jsjuni
Copy link
Author

jsjuni commented Dec 1, 2009

I need to rewrite some namespaces in OWL ontologies serialized as RDF/XML. They appear in entity declarations, namespace definitions, attributes, and comments. If modifying entity declarations and namespace definitions in place isn't kosher, I'd be happy with the ability to create new ones as long as I can replace (not merely add to) existing ones.

@flavorjones
Copy link
Member

ok, I've changed the name of this issue to "allow creation and deletion of Entity Declaration elements". we'll try to get it into 1.4.1.

@tenderlove
Copy link
Member

entity decl objects can be created. closed by b7c0763

flavorjones added a commit that referenced this issue Apr 7, 2021
…tection

fix: only check for the header unless Nokogiri provides LDFLAGS
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants