common/tools/split_sysdef.pl
changeset 1077 f16ac94c147c
parent 1075 20205e7ab525
child 1078 551e851f4b49
equal deleted inserted replaced
1076:86434e6d9873 1077:f16ac94c147c
    93 
    93 
    94 my $systemmodel = $systemdefinition->getElementsByTagName("systemModel")->item(0);
    94 my $systemmodel = $systemdefinition->getElementsByTagName("systemModel")->item(0);
    95 my $systemmodel_attributes = $systemmodel->getAttributes();
    95 my $systemmodel_attributes = $systemmodel->getAttributes();
    96 my $systemmodel_attributes_tostring = '';
    96 my $systemmodel_attributes_tostring = '';
    97 for ($systemmodel_attributes->getValues) {$systemmodel_attributes_tostring .= " ".$_->getName."=\"".$_->getValue."\"";}
    97 for ($systemmodel_attributes->getValues) {$systemmodel_attributes_tostring .= " ".$_->getName."=\"".$_->getValue."\"";}
    98 $packagedef_header .= "<systemModel$systemmodel_attributes_tostring>\n";
    98 $packagedef_header .= " <systemModel$systemmodel_attributes_tostring>\n";
    99 $packagedef_trailer = "\n</systemModel>".$packagedef_trailer;
    99 $packagedef_trailer = "\n </systemModel>".$packagedef_trailer;
   100 
   100 
   101 for my $layer ( $systemmodel->getElementsByTagName("layer") )
   101 for my $layer ( $systemmodel->getElementsByTagName("layer") )
   102 {
   102 {
   103 	my $layer_name = $layer->getAttribute("name");
   103 	my $layer_name = $layer->getAttribute("name");
   104 	
   104 	
   105 	my $layer_attributes = $layer->getAttributes();
   105 	my $layer_attributes = $layer->getAttributes();
   106 	my $layer_attributes_tostring = '';
   106 	my $layer_attributes_tostring = '';
   107 	for ($layer_attributes->getValues) {$layer_attributes_tostring .= " ".$_->getName."=\"".$_->getValue."\"";}
   107 	for ($layer_attributes->getValues) {$layer_attributes_tostring .= " ".$_->getName."=\"".$_->getValue."\"";}
   108 	my $layer_header = "<layer$layer_attributes_tostring>\n";
   108 	my $layer_header = "  <layer$layer_attributes_tostring>\n   ";
   109 	my $layer_trailer = "\n</layer>";
   109 	my $layer_trailer = "\n  </layer>";
   110 	
   110 	
   111 	for my $block ( $layer->getElementsByTagName("block") )
   111 	for my $block ( $layer->getElementsByTagName("block") )
   112 	{
   112 	{
   113 		my $block_name = $block->getAttribute("name");
   113 		my $block_name = $block->getAttribute("name");
   114 		
   114