From: Mark Addison Date: Thu, 8 Jul 2004 19:34:29 +0000 (+0000) Subject: Added docs about the legacy format xml. X-Git-Tag: v0.06~43 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FSQL-Translator.git;a=commitdiff_plain;h=4a268a6c214c18c5753762ad59fa1a2430ede61a Added docs about the legacy format xml. --- diff --git a/lib/SQL/Translator/Parser/XML/SQLFairy.pm b/lib/SQL/Translator/Parser/XML/SQLFairy.pm index bf30f21..baa2cbb 100644 --- a/lib/SQL/Translator/Parser/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Parser/XML/SQLFairy.pm @@ -1,7 +1,7 @@ package SQL::Translator::Parser::XML::SQLFairy; # ------------------------------------------------------------------- -# $Id: SQLFairy.pm,v 1.6 2004-07-08 19:06:24 grommit Exp $ +# $Id: SQLFairy.pm,v 1.7 2004-07-08 19:34:29 grommit Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Mark Addison , # @@ -78,6 +78,24 @@ Schema::Field obj). Doesn't take any extra parser args at the moment. +=head1 LEGACY FORMAT + +The previous version of the SQLFairy XML allowed the attributes of the the +schema objects to be written as either xml attributes or as data elements, in +any combination. While this allows for lots of flexibility in writing the XML +the result is a great many possible XML formats, not so good for DTD writing, +XPathing etc! So we have moved to a fixed version described in +L. + +This version of the parser will still parse the old formats and emmit warnings +when it sees them being used. +The old format is B and B be supported in future +versions. + +To convert your old format files simply pass them through the translator; + + sqlt -f XML-SQLFairy -t XML-SQLFairy schema-old.xml > schema-new.xml + =cut # ------------------------------------------------------------------- @@ -85,7 +103,7 @@ Doesn't take any extra parser args at the moment. use strict; use vars qw[ $DEBUG $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use Data::Dumper; diff --git a/lib/SQL/Translator/Producer/XML/SQLFairy.pm b/lib/SQL/Translator/Producer/XML/SQLFairy.pm index 33157b2..7db90bd 100644 --- a/lib/SQL/Translator/Producer/XML/SQLFairy.pm +++ b/lib/SQL/Translator/Producer/XML/SQLFairy.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::XML::SQLFairy; # ------------------------------------------------------------------- -# $Id: SQLFairy.pm,v 1.12 2004-07-08 19:05:26 grommit Exp $ +# $Id: SQLFairy.pm,v 1.13 2004-07-08 19:34:29 grommit Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -103,11 +103,25 @@ To see a complete example of the XML translate one of your schema :) Doesn't take any extra arguments. +=head1 LEGACY FORMAT + +The previous version of the SQLFairy XML allowed the attributes of the the +schema objects to be written as either xml attributes or as data elements, in +any combination. The old producer could produce attribute only or data element +only versions. While this allowed for lots of flexibility in writing the XML +the result is a great many possible XML formats, not so good for DTD writing, +XPathing etc! So we have moved to a fixed version described above. + +This version of the producer will now only produce the new style XML. +To convert your old format files simply pass them through the translator; + + sqlt -f XML-SQLFairy -t XML-SQLFairy schema-old.xml > schema-new.xml + =cut use strict; use vars qw[ $VERSION @EXPORT_OK ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/; use Exporter; use base qw(Exporter);