Benjamin Holzman writes:
my $dsd = new DSD 'foo.dsd'; # Indicates that <emph> tag is ignored
my $xml = "perl is <emph>terrific</emph>";
$dsd->apply($xml);
$xml =~ /perl is terrific/; # Matches!
I would think
$xml = $dsd->parse "perl is <emph>terrific</emph>";
$xml =~ /perl is terrific/; # Matches!
would have much more sense.
Ilya
I see what you mean, but I was sort of thinking that we'd have a RE
syntax for matching tags and attributes of tags. The DSD might contain
much more information than just whether tags should be ignored. It
might, for instance, know the difference between a structural tag and
one intended for formatting.
Exactly. So it knows which of the parts of
"perl is <emph>terrific</emph>"
should be left "in" the string, and which should be made metadata.
Ilya