This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns0="http://www.w3.org/2002/07/owl#" xmlns:ns1="http://example.org/" xmlns:ns2="http://www.w3.org/2000/01/rdf-schema#"> | |
<ns0:AnnotationProperty rdf:about="http://example.org/describe_state"/> | |
<ns0:Class rdf:about="http://example.org/phenotype1"> | |
<ns1:describe_state> | |
<ns1:state rdf:about="http://example.org/state1"> | |
<ns2:label>leg has more than 10 and less than 30 setae</ns2:label> | |
</ns1:state> | |
</ns1:describe_state> | |
<ns0:equivalentClass> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add already mapped namespaces and language | |
@contents = contents.map do |c| | |
c = Nokogiri::XML.parse(c.copy(true).to_s) if c.is_a?(LibXML::XML::Node) | |
if c.is_a?(Nokogiri::XML::Element) | |
c = Nokogiri::XML.parse(c.dup.to_xml(:save_with => Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS)).root | |
# Gather namespaces from self and decendant nodes | |
# | |
# prefix mappings | |
# Look for @xmlns and @prefix mappings. Add any other mappings from options[:prefixes] | |
# that aren't already defined on this node |
NewerOlder