Skip to content

Commit

Permalink
Yard updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Nov 30, 2012
1 parent ea261b6 commit bdc8e8d
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 160 deletions.
10 changes: 5 additions & 5 deletions History.markdown
Expand Up @@ -15,7 +15,7 @@


### 0.3.11 ### 0.3.11
* Up to date with RDFa Proposed Recomendation versions of specs. * Up to date with RDFa Proposed Recomendation versions of specs.
* Fix problems with @resource=[] or @about=[], which should be ignored and use the next most appropriate attribute. * Fix problems with @resource=\[\] or @about=\[\], which should be ignored and use the next most appropriate attribute.
* Remove support for @data, which was previously a synonym for @src in HTML5. * Remove support for @data, which was previously a synonym for @src in HTML5.
* More robust detection of XHTML1 if version is rdfa1.0 * More robust detection of XHTML1 if version is rdfa1.0
* Support change to remove @rel/@rev elements that aren't CURIES or IRIs when in the presense of @property * Support change to remove @rel/@rev elements that aren't CURIES or IRIs when in the presense of @property
Expand Down Expand Up @@ -49,8 +49,8 @@
* Don't default xhtml1 and rdfa1.1 in parser; depend on host_detect. * Don't default xhtml1 and rdfa1.1 in parser; depend on host_detect.
* Use separate context documents for XML, XHTML and HTML. * Use separate context documents for XML, XHTML and HTML.
* Remove Facet gem, which was causing problems with Active Record. * Remove Facet gem, which was causing problems with Active Record.
* Added full support for HTML5 <time> element. * Added full support for HTML5 &lt;time&gt; element.
* Added support for HTML5 <data> element with @value attribute to create a plain literal with possible language. * Added support for HTML5 &lt;data&gt; element with @value attribute to create a plain literal with possible language.
* Change vocabulary expansion rules to use OWL 2 RL entailment. * Change vocabulary expansion rules to use OWL 2 RL entailment.
* Terms can now include a '/', to allow for use with @vocab where the class/property is a relative IRI. * Terms can now include a '/', to allow for use with @vocab where the class/property is a relative IRI.
* In writer: * In writer:
Expand Down Expand Up @@ -79,9 +79,9 @@
* Add rdfa:hasVocabulary when encountering @vocab * Add rdfa:hasVocabulary when encountering @vocab
* Implemented Reader#expand to perform vocabulary expansion using RDFS rules 5, 7, 9 and 11. * Implemented Reader#expand to perform vocabulary expansion using RDFS rules 5, 7, 9 and 11.
* Support for RDF collections (rdf:List) using @member attribute. * Support for RDF collections (rdf:List) using @member attribute.
*Implemented :expand option to reader, which allows normal use of reader interface without requiring the use of the #expand method. * Implemented :expand option to reader, which allows normal use of reader interface without requiring the use of the #expand method.
* Add caches for popular vocabularies to speed load time. * Add caches for popular vocabularies to speed load time.
Add :vocabulary_profile as Reader option to allow for use of persistent vocabulary caches. * Add :vocabulary_profile as Reader option to allow for use of persistent vocabulary caches.
* Performance improvements by evaluating debug statements in block only when debug enabled. * Performance improvements by evaluating debug statements in block only when debug enabled.


### 0.3.5 ### 0.3.5
Expand Down
13 changes: 7 additions & 6 deletions README.markdown
Expand Up @@ -279,11 +279,11 @@ use the same prefix definitions found during parsing:
puts graph.dump(:rdfa, :prefixes => prefixes) puts graph.dump(:rdfa, :prefixes => prefixes)


### Template-based Writer ### Template-based Writer
The RDFa writer uses [Haml][Haml] templates for code generation. This allows fully The RDFa writer uses [Haml][Haml] templates for code generation. This allows
customizable RDFa output in a variety of host languages. fully customizable RDFa output in a variety of host languages. The [default
The [default template]({RDF::RDFa::Writer::DEFAULT_HAML}) generates human readable HTML5 template]({RDF::RDFa::Writer::DEFAULT_HAML}) generates human readable HTML5
output. A [minimal template]({RDF::RDFa::Writer::MIN_HAML}) generates HTML, which is not output. A [minimal template]({RDF::RDFa::Writer::MIN_HAML}) generates HTML,
intended for human consumption. which is not intended for human consumption.


To specify an alternative Haml template, consider the following: To specify an alternative Haml template, consider the following:


Expand Down Expand Up @@ -437,7 +437,7 @@ Full documentation available on [Rubydoc.info][RDFa doc]
* [RDF.rb][RDF.rb] * [RDF.rb][RDF.rb]
* [Distiller](http://rdf.greggkellogg.net/distiller) * [Distiller](http://rdf.greggkellogg.net/distiller)
* [Documentation][RDFa doc] * [Documentation][RDFa doc]
* [History]{file:History.markdown} * [History](file:History.markdown)
* [RDFa 1.1 Core][RDFa 1.1 Core] * [RDFa 1.1 Core][RDFa 1.1 Core]
* [XHTML+RDFa 1.1][XHTML+RDFa 1.1] * [XHTML+RDFa 1.1][XHTML+RDFa 1.1]
* [RDFa-test-suite](http://rdfa.info/test-suite/ "RDFa test suite") * [RDFa-test-suite](http://rdfa.info/test-suite/ "RDFa test suite")
Expand Down Expand Up @@ -487,3 +487,4 @@ see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
[RDFa doc]: http://rubydoc.info/github/ruby-rdf/rdf-rdfa/frames [RDFa doc]: http://rubydoc.info/github/ruby-rdf/rdf-rdfa/frames
[Haml]: http://haml-lang.com/ [Haml]: http://haml-lang.com/
[Turtle]: http://www.w3.org/TR/2011/WD-turtle-20110809/ [Turtle]: http://www.w3.org/TR/2011/WD-turtle-20110809/
[Backports]: http://rubygems.org/gems/backports
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.3.15 0.3.16
2 changes: 1 addition & 1 deletion example-files/core.html
Expand Up @@ -475,7 +475,7 @@
pre.sh_sourceCode .sh_attribute { color: #006400; } pre.sh_sourceCode .sh_attribute { color: #006400; }


</style><link href="http://www.w3.org/StyleSheets/TR/W3C-PR" rel="stylesheet" type="text/css" charset="utf-8" /></head> </style><link href="http://www.w3.org/StyleSheets/TR/W3C-PR" rel="stylesheet" type="text/css" charset="utf-8" /></head>
<body><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /></a></p><h1 property="dcterms:title" class="title" id="title">RDFa Core 1.1</h1><h2 property="bibo:subtitle" id="subtitle">Syntax and processing rules for embedding RDF through attributes</h2><h2 property="dcterms:issued" datatype="xsd:dateTime" content="2012-05-08T05:00:00+0000" id="w3c-proposed-recommendation-08-may-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Proposed Recommendation 08 May 2012</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">http://www.w3.org/TR/2012/REC-rdfa-core-20120607/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/rdfa-core/">http://www.w3.org/TR/rdfa-core/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://www.w3.org/2010/02/rdfa/drafts#rdfa-core">http://www.w3.org/2010/02/rdfa/drafts#rdfa-core</a></dd><dt>Previous version:</dt><dd><a rel="dcterms:replaces" href="http://www.w3.org/TR/2012/CR-rdfa-core-20120313/">http://www.w3.org/TR/2012/CR-rdfa-core-20120313/</a></dd><dt>Latest recommendation:</dt><dd><a href="http://www.w3.org/TR/rdfa-syntax/">http://www.w3.org/TR/rdfa-syntax/</a></dd><dt>Editors:</dt><dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name">Ben Adida</span>, Creative Commons, <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:ben@adida.net">ben@adida.net</a></span> </span> <body><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" /></a></p><h1 property="dcterms:title" class="title" id="title">RDFa Core 1.1</h1><h2 property="bibo:subtitle" id="subtitle">Syntax and processing rules for embedding RDF through attributes</h2><h2 property="dcterms:issued" datatype="xsd:dateTime" content="2012-05-08T05:00:00+0000" id="w3c-proposed-recommendation-08-may-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Proposed Recommendation 08 May 2012</h2><dl><dt>This version:</dt><dd><a href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">http://www.w3.org/TR/2012/REC-rdfa-core-20120607/</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/rdfa-core/">http://www.w3.org/TR/rdfa-core/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://www.w3.org/2010/02/rdfa/drafts#rdfa-core">http://www.w3.org/2010/02/rdfa/drafts#rdfa-core</a></dd><dt>Previous version:</dt><dd><a rel="dcterms:replaces" href="http://www.w3.org/TR/2012/REC-rdfa-core-20120607/">http://www.w3.org/TR/2012/REC-rdfa-core-20120607/</a></dd><dt>Latest recommendation:</dt><dd><a href="http://www.w3.org/TR/rdfa-syntax/">http://www.w3.org/TR/rdfa-syntax/</a></dd><dt>Editors:</dt><dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name">Ben Adida</span>, Creative Commons, <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:ben@adida.net">ben@adida.net</a></span> </span>
</dd> </dd>
<dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name">Mark Birbeck</span>, webBackplane, <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:mark.birbeck@webBackplane.com">mark.birbeck@webBackplane.com</a></span> </span> <dd rel="bibo:editor" inlist=""><span typeof="foaf:Person"><span property="foaf:name">Mark Birbeck</span>, webBackplane, <span class="ed_mailto"><a rel="foaf:mbox" href="mailto:mark.birbeck@webBackplane.com">mark.birbeck@webBackplane.com</a></span> </span>
</dd> </dd>
Expand Down
2 changes: 1 addition & 1 deletion example-files/core.ttl
Expand Up @@ -124,7 +124,7 @@
<http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/>, <http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/>,
<http://www.w3.org/TR/2008/REC-xml-20081126/>, <http://www.w3.org/TR/2008/REC-xml-20081126/>,
<http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/>; <http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/>;
dcterms:replaces <http://www.w3.org/TR/2012/CR-rdfa-core-20120313/>; dcterms:replaces <http://www.w3.org/TR/2012/REC-rdfa-core-20120607/>;
dcterms:requires <http://www.w3.org/TR/2009/REC-owl2-overview-20091027/>, dcterms:requires <http://www.w3.org/TR/2009/REC-owl2-overview-20091027/>,
<http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/>, <http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/>,
<http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/>, <http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/>,
Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/rdfa.rb
Expand Up @@ -17,7 +17,7 @@ module RDF
# #
# @see http://rubygems.org/gems/rdf # @see http://rubygems.org/gems/rdf
# @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0 # @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0
# @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/ # @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
# @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/ # @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/
# @see http://dev.w3.org/html5/rdfa/ # @see http://dev.w3.org/html5/rdfa/
# #
Expand Down
2 changes: 1 addition & 1 deletion lib/rdf/rdfa/expansion.rb
Expand Up @@ -10,7 +10,7 @@ module Expansion
## ##
# Perform vocabulary expansion on the resulting default graph. # Perform vocabulary expansion on the resulting default graph.
# #
# Vocabulary expansion relies on a sub-set of OWL [OWL2-PROFILES] entailment to add # Vocabulary expansion relies on a sub-set of OWL entailment to add
# triples to the default graph based on rules and property/class relationships # triples to the default graph based on rules and property/class relationships
# described in referenced vocabularies. # described in referenced vocabularies.
# #
Expand Down
8 changes: 4 additions & 4 deletions lib/rdf/rdfa/reader.rb
Expand Up @@ -21,7 +21,7 @@ module RDF::RDFa
# #
# Based on processing rules described here: # Based on processing rules described here:
# @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0 # @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0
# @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/ # @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
# @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/ # @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/
# @see http://dev.w3.org/html5/rdfa/ # @see http://dev.w3.org/html5/rdfa/
# #
Expand Down Expand Up @@ -61,11 +61,11 @@ class Reader < RDF::Reader
Regexp::EXTENDED) Regexp::EXTENDED)


# This expression matches an term as defined in # This expression matches an term as defined in
# [RDFA-CORE](# @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/#s_terms) # [RDFA-CORE](http://www.w3.org/TR/2012/REC-rdfa-core-20120607/#s_terms)
# #
# For the avoidance of doubt, this definition means a 'term' # For the avoidance of doubt, this definition means a 'term'
# in RDFa is an XML NCName that also permits slash as a non-leading character. # in RDFa is an XML NCName that also permits slash as a non-leading character.
# @see http://www.w3.org/TR/2012/CR-rdfa-core-20120313/#s_terms # @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/#s_terms
TERM_REGEXP = Regexp.new( TERM_REGEXP = Regexp.new(
%{^ %{^
(?!\\\\u0301) # &#x301; is a non-spacing acute accent. (?!\\\\u0301) # &#x301; is a non-spacing acute accent.
Expand Down Expand Up @@ -253,7 +253,7 @@ def inspect
# @yield [reader] `self` # @yield [reader] `self`
# @yieldparam [RDF::Reader] reader # @yieldparam [RDF::Reader] reader
# @yieldreturn [void] ignored # @yieldreturn [void] ignored
# @raise [Error]:: Raises RDF::ReaderError if _validate_ # @raise [RDF::ReaderError] if _validate_
def initialize(input = $stdin, options = {}, &block) def initialize(input = $stdin, options = {}, &block)
super do super do
@debug = options[:debug] @debug = options[:debug]
Expand Down
6 changes: 3 additions & 3 deletions lib/rdf/rdfa/reader/nokogiri.rb
Expand Up @@ -26,7 +26,7 @@ def initialize(node, parent = nil)
## ##
# Element language # Element language
# #
# From HTML5 [3.2.3.3] # From HTML5 3.2.3.3
# If both the lang attribute in no namespace and the lang attribute in the XML namespace are set # If both the lang attribute in no namespace and the lang attribute in the XML namespace are set
# on an element, user agents must use the lang attribute in the XML namespace, and the lang # on an element, user agents must use the lang attribute in the XML namespace, and the lang
# attribute in no namespace must be ignored for the purposes of determining the element's # attribute in no namespace must be ignored for the purposes of determining the element's
Expand Down Expand Up @@ -140,8 +140,8 @@ def initialize(node_set, parent)
## ##
# Return a proxy for each child # Return a proxy for each child
# #
# @yield(child) # @yield child
# @yieldparam(NodeProxy) # @yieldparam [NodeProxy]
def each def each
@node_set.each do |c| @node_set.each do |c|
yield NodeProxy.new(c, parent) yield NodeProxy.new(c, parent)
Expand Down
8 changes: 4 additions & 4 deletions lib/rdf/rdfa/reader/rexml.rb
Expand Up @@ -28,7 +28,7 @@ def initialize(node, parent = nil)
## ##
# Element language # Element language
# #
# From HTML5 [3.2.3.3] # From HTML5 3.2.3.3
# If both the lang attribute in no namespace and the lang attribute in the XML namespace are set # If both the lang attribute in no namespace and the lang attribute in the XML namespace are set
# on an element, user agents must use the lang attribute in the XML namespace, and the lang # on an element, user agents must use the lang attribute in the XML namespace, and the lang
# attribute in no namespace must be ignored for the purposes of determining the element's # attribute in no namespace must be ignored for the purposes of determining the element's
Expand Down Expand Up @@ -143,7 +143,7 @@ def xpath(*args)
end end
end end


# Simple case for <script> # Simple case for &lt;script&gt;
def css(path) def css(path)
xpath("//script[@type]") xpath("//script[@type]")
end end
Expand All @@ -169,8 +169,8 @@ def initialize(node_set, parent)
## ##
# Return a proxy for each child # Return a proxy for each child
# #
# @yield(child) # @yield child
# @yieldparam(NodeProxy) # @yieldparam [NodeProxy]
def each def each
@node_set.each do |c| @node_set.each do |c|
yield NodeProxy.new(c, parent) yield NodeProxy.new(c, parent)
Expand Down

0 comments on commit bdc8e8d

Please sign in to comment.