.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RDF::TrineX::Parser::Pretdsl 3pm" .TH RDF::TrineX::Parser::Pretdsl 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME RDF::TrineX::Parser::Pretdsl \- the Perl RDF Extended Turtle Domain\-Specific Language .SH DESCRIPTION .IX Header "DESCRIPTION" Pretdsl is a domain-specific language for describing Perl projects (in particular CPAN releases) in RDF triples. It can be seen as an enhanced version of Turtle/N3, or an application of ShorthandRDF. .SS "About Pretdsl" .IX Subsection "About Pretdsl" Pretdsl is Notation 3, plus... .PP \fIPredefined prefixes\fR .IX Subsection "Predefined prefixes" .PP The following prefixes are pre-declared (though you can explicitly declare them, or redeclare them to be something else if you prefer...) .PP .Vb 10 \& # RDFa 1.1 prefixes \& @prefix grddl: . \& @prefix ma: . \& @prefix owl: . \& @prefix rdf: . \& @prefix rdfa: . \& @prefix rdfs: . \& @prefix rif: . \& @prefix skos: . \& @prefix skosxl: . \& @prefix wdr: . \& @prefix void: . \& @prefix wdrs: . \& @prefix xhv: . \& @prefix xml: . \& @prefix xsd: . \& @prefix cc: . \& @prefix ctag: . \& @prefix dc: . \& @prefix dcterms: . \& @prefix foaf: . \& @prefix gr: . \& @prefix ical: . \& @prefix og: . \& @prefix rev: . \& @prefix sioc: . \& @prefix v: . \& @prefix vcard: . \& @prefix schema: . \& \& # Additional useful vocabularies \& @prefix cpant: . \& @prefix dbug: . \& @prefix dcs: . \& @prefix deps: . \& @prefix doap: . \& @prefix earl: . \& @prefix nfo: . \& @prefix pretdsl: . \& @prefix pretdsl\-dt: . .Ve .PP \fIPredefined terms\fR .IX Subsection "Predefined terms" .PP Like how Turtle defines "a" as a term that expands to rdf:type, Pretdsl defines some terms: .PP .Vb 4 \& # Generally useful predicates \& @term label rdfs:label . \& @term comment rdfs:comment . \& @term seealso rdfs:seeAlso . \& \& # Makefile predicates \& @term abstract_from cpant:abstract_from . \& @term author_from cpant:author_from . \& @term license_from cpant:license_from . \& @term requires_from cpant:requires_from . \& @term perl_version_from cpant:perl_version_from . \& @term version_from cpant:version_from . \& @term readme_from cpant:readme_from . \& @term no_index cpant:no_index . \& @term install_script cpant:install_script . \& @term requires cpant:requires . \& @term requires_external_bin cpant:requires_external_bin . \& @term recommends cpant:recommends . \& @term test_requires cpant:test_requires . \& @term configure_requires cpant:configure_requires . \& @term build_requires cpant:build_requires . \& @term provides cpant:provides . \& \& # Changelog predicates \& @term issued dc:issued . \& @term changeset dcs:changeset . \& @term item dcs:item . \& @term versus dcs:versus . \& \& # Changelog datatypes \& @term Addition pretdsl\-dt:Addition . \& @term BackCompat pretdsl\-dt:BackCompat . \& @term Bugfix pretdsl\-dt:Bugfix . \& @term Change pretdsl\-dt:Change . \& @term Documentation pretdsl\-dt:Documentation . \& @term Packaging pretdsl\-dt:Packaging . \& @term Regresion pretdsl\-dt:Regression . \& @term Removal pretdsl\-dt:Removal . \& @term SecurityFix pretdsl\-dt:SecurityFix . \& @term SecurityRegression pretdsl\-dt:SecurityRegression . \& @term Tests pretdsl\-dt:Tests . \& @term Update pretdsl\-dt:Update . .Ve .PP \fIXSD datatype shorthands\fR .IX Subsection "XSD datatype shorthands" .PP Like how Turtle has shorthands for literals of type xsd:integer, xsd:double and xsd:boolean, such that they don't need quoting or an explicit datatype, Pretdsl defines shorthands for xsd:date and xsd:dateTime. .PP For xsd:date, just use YYYY-MM-DD format. For xsd:dateTime, use YYYY\-MM\-DDThh:mm:ss.sss+zzzz (seconds must be included, but fractions of seconds are optional; timezones are optional, and 'Z' is supported for UTC). .PP \fIPerl-specific datatype shorthands\fR .IX Subsection "Perl-specific datatype shorthands" .PP Pretdsl defines a special quoting style for Perl-specific resources. A quoted resource starts and ends with a backtick (`). The first backtick may also be preceded by a single letter which is used for disambiguation. .PP Distributions: .PP .Vb 2 \& \`HTML\-HTML5\-Parser\` \& d\`HTML\-HTML5\-Parser\` .Ve .PP Releases: .PP .Vb 4 \& \`HTML\-HTML5\-Parser 0.200\` \& \`HTML\-HTML5\-Parser 0.200 cpan:TOBYINK\` \& r\`HTML\-HTML5\-Parser 0.200\` \& r\`HTML\-HTML5\-Parser 0.200 cpan:TOBYINK\` .Ve .PP Files: .PP .Vb 3 \& \`./README\` # needs to contain a slash to disambiguate \& \`xt/test.pod\` # with distributions \& f\`README\` # or use explicit disambiguating letter \& \& # Files may be qualified with a release... \& f\`README HTML\-HTML5\-Parser 0.200 cpan:TOBYINK\` .Ve .PP Modules: .PP .Vb 1 \& \`HTML::HTML5::Parser\` \& \& # The following are semantically identical \& m\`HTML::HTML5::Parser\` \& f\`lib/HTML/HTML5/Parser.pm\` \& \& # And so this is fine too... \& m\`HTML::HTML5::Parser HTML\-HTML5\-Parser 0.200 cpan:TOBYINK\` \& \& # Trailing "::" can disambiguate \& \`JSON::\` .Ve .PP Packages: .PP .Vb 3 \& # Always need the disambiguation letter to avoid confusion \& # with modules \& p\`HTML::HTML5::Parser\` .Ve .PP The line between packages and modules is a little blurred. Future versions of Pretdsl may also provide datatype shorthands for classes and roles (in the Moose/Mouse sense). .PP CPAN IDs: .PP .Vb 4 \& # It looks like a qname, but it\*(Aqs not. It\*(Aqs a case\-insensitive \& # literal shorthand \& cpan:TOBYINK \& cpan:tobyink .Ve .PP RT Bugs: .PP .Vb 2 \& # No the hash below doesn\*(Aqt start a comment. \& RT#12345 .Ve .PP \fIThe Switch-a-Roo\fR .IX Subsection "The Switch-a-Roo" .PP All the Perl-specific datatypes, plus the changelog datatypes mentioned above are intercepted during the parse, and being added to the model as literals, they are replaced with blank nodes and URIs, and enriched with additional triples. .PP So the following Pretdsl which appears to have a literal subject: .PP .Vb 2 \& \`Example\-Distribution 0.001 cpan:TOBYINK\` \& issued 2012\-06\-18 . .Ve .PP May be equivalent to the following Turtle: .PP .Vb 7 \& \& a doap:Version ; \& dcterms:identifier "Example\-Distribution\-0.001"^^xsd:string ; \& doap:revision "0.001"^^xsd:string ; \& dcs:released\-by cpan:tobyink ; \& doap:file\-release ; \& dcterms:issued "2012\-06\-18"^^xsd:date . \& \& \& doap:release . .Ve .SS "About the Parser" .IX Subsection "About the Parser" The parser provides the same API as RDF::Trine::Parser::Notation3. .SH BUGS .IX Header "BUGS" Please report any bugs to . .SH "SEE ALSO" .IX Header "SEE ALSO" RDF::Trine::Parser::NTriples, RDF::Trine::Parser::Turtle, RDF::Trine::Parser::Notation3, RDF::Trine::Parser::ShorthandRDF. .PP Module::Install::RDF, Module::Install::DOAP, Module::Install::DOAPChangeSets, Module::Package::RDF. .SH AUTHOR .IX Header "AUTHOR" Toby Inkster . .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2012 by Toby Inkster. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .SH "DISCLAIMER OF WARRANTIES" .IX Header "DISCLAIMER OF WARRANTIES" THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.