Class: Nokogiri::XML::Schematron::Namespace
- Defined in:
- lib/nokogiri/xml/schematron/namespace.rb
Overview
The internal representation of the <sch:ns> XML element.
For example:
namespace = Nokogiri::XML::Schematron::Namespace.new(nil, prefix: "ex", uri: "http://example.com/ns#")
# => #<Nokogiri::XML::Schematron::Namespace:0x00007f8486acd4f8 @parent=nil, @children=[], @options={:prefix=>"ex", :uri=>"http://example.com/ns#"}>
namespace.to_builder.to_xml
# => "<?xml version=\"1.0\"?>\n<sch:ns xmlns:sch=\"http://purl.oclc.org/dsdl/schematron\" prefix=\"ex\" uri=\"http://example.com/ns#\"/>\n"
Instance Attribute Summary collapse
-
#prefix ⇒ String
The value of the @prefix XML attribute.
-
#uri ⇒ String
The value of the @uri XML attribute.
Attributes inherited from Base
Method Summary
Methods inherited from Base
attribute, element, #initialize, #to_builder
Constructor Details
This class inherits a constructor from Nokogiri::XML::Schematron::Base
Instance Attribute Details
#prefix ⇒ String
Returns the value of the @prefix XML attribute.
18 |
# File 'lib/nokogiri/xml/schematron/namespace.rb', line 18 attribute :prefix |
#uri ⇒ String
Returns the value of the @uri XML attribute.
22 |
# File 'lib/nokogiri/xml/schematron/namespace.rb', line 22 attribute :uri |