Class: Nokogiri::XML::Schematron::Paragraph

Inherits:
Base
  • Object
show all
Defined in:
lib/nokogiri/xml/schematron/paragraph.rb

Overview

The internal representation of the <sch:p> XML element.

For example:

paragraph = Nokogiri::XML::Schematron::Paragraph.new(nil, message: "Hello, world!")
# => #<Nokogiri::XML::Schematron::Paragraph:0x00007f848783e628 @parent=nil, @children=[], @options={:message=>"Hello, world!"}>
paragraph.to_builder.to_xml
# => "<?xml version=\"1.0\"?>\n<sch:p xmlns:sch=\"http://purl.oclc.org/dsdl/schematron\">Hello, world!</sch:p>\n"

Instance Attribute Summary collapse

Attributes inherited from Base

#children, #options, #parent

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

#messageString

Returns the text content of the <sch:p> XML element.

Returns:

  • (String)

    the text content of the <sch:p> XML element.



18
# File 'lib/nokogiri/xml/schematron/paragraph.rb', line 18

attribute :message