Greetings all -
I'm working on a short script that will compare two
XML DTDs. I create two hashes (one for each DTD), and
use the DTD Element names as the key, and a referece
to a list that contains the element number (i.e.,
where it appears in the document, from 0 to n)
followed by that element's content model(s) as the
key's value. The assignment looks like this:
$elements1{$element} = [@content_list];
The hashes are created just fine, but I'm stumped
on how to dereference the list. I compare the second
DTD to the first, based on element names, looking for
a match, with:
while (($element,$content) = each(%elements2)) {
if(exists($elements1{$element})) {
If I get a match (i.e., both DTDs have an occurence of
the same element name), I want to compare the content
models and their positions within the respective DTDs.
I can get the content model list dereferenced from
the second hash by using @$content....but how do I
dereference the list in the first hash (%elements1)?
I know I can do $elements1{$element}[x] to get to an
idividual index within the list, but how can I pull
the whole list into a temporary storage variable?
I've tried a number of different ways and none of them
have worked.
Thanks in advance.
Tim
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]