In this tutorial I'll show you how to modify dbtoy's output, using custom stylesheets.
As of release 0.6, dbtoy lets you insert a fragment of your choice in its xml files, between the header
and the root tag. This feature can be used to add a reference to an xsl stylesheet to all the files, another use
could be the insertion of a disclaimer or a comment.
To add a stylesheet to dbtoy files, just add the '-x' option to your command line arguments, e.g.:
[user@testlinux]$ dbtoy -u user -p my_pwd -d mysql -x'<?xml-stylesheet type="text/xsl" href="file:///path/to/file.xsl"?>' /mnt/dbtoy ![]() |
![]() |
-- DDL script. Generated from dbtoy output.
create table user (
int(11) id PRIMARY KEY,
varchar(64) login ,
varchar(64) password ,
enum('yes','no') enabled ,
);
-- Table data insert script. Generated from dbtoy output
insert into user values(
'1',
'domenico',
'domepw1',
'yes',
);
insert into user values(
'2',
'andrea',
'ris1pl',
'yes',
);
insert into user values(
'3',
'luca',
'def_12p',
'yes',
);
insert into user values(
'4',
'maek',
'rino76',
'yes',
);
insert into user values(
'5',
'pino_dd',
'para0m9',
'yes',
);
insert into user values(
'6',
'enzo',
'enzo2',
'no',
);
insert into user values(
'7',
'roby',
'u4ea',
'yes',
);
insert into user values(
'8',
'lucio',
'21mar77',
'yes',
);
insert into user values(
'9',
'franko',
'xxx0x',
'no',
);
insert into user values(
'10',
'frank',
'ald9k',
'no',
);
insert into user values(
'11',
'dome',
'ping12_d',
'yes',
);
insert into user values(
'12',
'andrew',
'cs_best',
'yes',
);
insert into user values(
'13',
'lucy',
'beatl3',
'yes',
);
insert into user values(
'14',
'pinuccio',
'zagara11',
'yes',
);
insert into user values(
'15',
'gio',
'jj21p',
'yes',
);
insert into user values(
'16',
'giove',
'sun4u',
'yes',
);
