Commits

Shlomi Fish  committed bf02397

Commit temporary changes.

  • Participants
  • Parent commits 2a1e326
  • Branches XML-GrammarBase-conversion-temp-1

Comments (0)

Files changed (3)

File perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction/RNG_Renderer.pm

 
 use MooX 'late';
 
-extends ("XML::Grammar::FictionBase::XSLT::Converter");
+use XML::GrammarBase::Role::RelaxNG v0.2.1;
 
-has '+rng_schema_basename' => (default => "fiction-xml.rng");
+with ('XML::GrammarBase::Role::RelaxNG');
+
+has '+module_base' => (default => 'XML-Grammar-Fiction',);
+has '+rng_schema_basename' => (default => 'fiction-xml.rng',);
 
 =head1 METHODS
 

File perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction/ToDocBook.pm

 
 use MooX 'late';
 
+use XML::GrammarBase::Role::XSLT;
+
 extends ("XML::Grammar::Fiction::RNG_Renderer");
 
-has '+xslt_transform_basename' => (default => "fiction-xml-to-docbook.xslt");
+with XSLT(output_format => 'docbook');
+has '+to_docbook_xslt_transform_basename' => (default => "fiction-xml-to-docbook.xslt");
+
+sub xslt_transform_basename
+{
+    return shift->to_docbook_xslt_transform_basename;
+}
 
 =head1 NAME
 
 
 Inherited - (to settle pod-coverage).
 
+=head2 to_docbook_xslt_transform_basename()
+
+Inherited - (to settle pod-coverage).
+
 =cut
 
 
 {
     my ($self, $args) = @_;
 
-    return $self->perform_translation($args);
+    return $self->perform_xslt_translation($args);
 }
 
 1;

File perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction/ToHTML.pm

 
 use MooX 'late';
 
+use XML::GrammarBase::Role::XSLT;
+
 extends( 'XML::Grammar::Fiction::RNG_Renderer' );
 
+with XSLT(output_format => 'html');
+has '+to_html_xslt_transform_basename' => (default => "fiction-xml-to-html.xslt");
+
+sub xslt_transform_basename
+{
+    return shift->to_html_xslt_transform_basename;
+}
+
 =head1 NAME
 
 XML::Grammar::Fiction::ToHTML - module that converts the Fiction-XML to HTML.
 
 =head1 METHODS
 
+=head2 to_html_xslt_transform_basename()
+
+The basename of the to_html transform.
+
 =head2 xslt_transform_basename()
 
 Inherited - (to settle pod-coverage).
 
 =cut
 
-has '+xslt_transform_basename' => (default => "fiction-xml-to-html.xslt", );
-
 =head2 translate_to_html
 
 =over 4
 {
     my ($self, $args) = @_;
 
-    return $self->perform_translation($args);
+    return $self->perform_xslt_translation($args);
 }
 
 1;