Class: Nokogiri::XML::Document
- Inherits:
-
Object
- Object
- Nokogiri::XML::Document
- Defined in:
- lib/dor/utils/ng_tidy.rb
Constant Summary collapse
- PRETTIFY_XSLT =
Nokogiri::XSLT " <xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n <xsl:output omit-xml-declaration=\"yes\" indent=\"yes\"/>\n <xsl:template match=\"node()|@*\">\n <xsl:copy>\n <xsl:apply-templates select=\"node()|@*\"/>\n </xsl:copy>\n </xsl:template>\n </xsl:stylesheet>\n"
Instance Method Summary collapse
Instance Method Details
#prettify ⇒ Object
31 32 33 |
# File 'lib/dor/utils/ng_tidy.rb', line 31 def prettify PRETTIFY_XSLT.transform(self).to_xml end |