Class: Nokogiri::XML::Schematron::Pattern
- Defined in:
- lib/nokogiri/xml/schematron/pattern.rb
Overview
The internal representation of the <sch:pattern> XML element.
For example:
pattern = Nokogiri::XML::Schematron::Pattern.new(nil, id: "pattern1", title: "Example pattern")
# => #<Nokogiri::XML::Schematron::Pattern:0x00007f8486a71f18 @parent=nil, @children=[], @options={:id=>"pattern1", :title=>"Example pattern"}>
pattern.to_builder.to_xml
# => "<?xml version=\"1.0\"?>\n<sch:pattern xmlns:sch=\"http://purl.oclc.org/dsdl/schematron\" id=\"pattern1\">\n <sch:title>Example pattern</sch:title>\n</sch:pattern>\n"
Instance Attribute Summary collapse
-
#id ⇒ String
The value of the @id XML attribute.
-
#title ⇒ String
The value of the @title XML element.
Attributes inherited from Base
Instance Method Summary collapse
-
#context(context, **options) {|node| ... } ⇒ Nokogiri::XML::Schematron::Node::Context
Create a new
Node::Context
object. -
#p(**options) {|p| ... } ⇒ Nokogiri::XML::Schematron::Paragraph
Create a new
Paragraph
object. -
#rule(**options) {|rule| ... } ⇒ Nokogiri::XML::Schematron::Rule
Create a new
Rule
object.
Methods inherited from Base
attribute, element, #initialize, #to_builder
Constructor Details
This class inherits a constructor from Nokogiri::XML::Schematron::Base
Instance Attribute Details
#id ⇒ String
Returns the value of the @id XML attribute.
21 |
# File 'lib/nokogiri/xml/schematron/pattern.rb', line 21 attribute :id |
#title ⇒ String
Returns the value of the @title XML element.
25 |
# File 'lib/nokogiri/xml/schematron/pattern.rb', line 25 attribute :title |
Instance Method Details
#context(context, **options) {|node| ... } ⇒ Nokogiri::XML::Schematron::Node::Context
Create a new Node::Context
object.
111 |
# File 'lib/nokogiri/xml/schematron/pattern.rb', line 111 element :context, Nokogiri::XML::Schematron::Nodes::Context |
#p(**options) {|p| ... } ⇒ Nokogiri::XML::Schematron::Paragraph
Create a new Paragraph
object.
120 |
# File 'lib/nokogiri/xml/schematron/pattern.rb', line 120 element :p, Nokogiri::XML::Schematron::Paragraph |
#rule(**options) {|rule| ... } ⇒ Nokogiri::XML::Schematron::Rule
Create a new Rule
object.
130 |
# File 'lib/nokogiri/xml/schematron/pattern.rb', line 130 element :rule, Nokogiri::XML::Schematron::Rule |