[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kdoc
Subject:    SGML-Output
From:       Wolfgang Bangerth <Wolfgang.Bangerth () IWR ! Uni-Heidelberg ! De>
Date:       1999-12-04 12:58:00
[Download RAW message or body]


Hi there,
after finally finding out how to process SGML output, I fixed several
things to reduce most of jade's error messages. At several places, I made
the output look better (I actually had to read it, so I felt that was
necessary) and you may skip these patches. I would like to attract your
attention to the following hunks, however:

no. 2) tbody was not opened
no. 3) table was not closed
nos. 4,6,7 ) SGML does not like cross references to contain underscores,
       so we have to escape them
no. 5) typo
no. 8) I think, this must be an oversight. It produced empty <></> pairs.

Regards
  Wolfgang


-------------------------------------------------------------------------
Wolfgang Bangerth          email: wolfgang.bangerth@iwr.uni-heidelberg.de
                             www: http://gaia.iwr.uni-heidelberg.de/~wolf



*** kdocCxxDocbook.pm.1	Sat Dec  4 12:45:20 1999
--- kdocCxxDocbook.pm	Sat Dec  4 13:40:37 1999
***************
*** 57,63 ****
  	print DOC chapter( "class-hierarchy", "$lib Class Hierarchy" );
  	printNodeHier( $rootnode );
  
! 	print DOC tclose( "chapter" ); 
  }
  
  sub printNodeHier
--- 57,63 ----
  	print DOC chapter( "class-hierarchy", "$lib Class Hierarchy" );
  	printNodeHier( $rootnode );
  
! 	print DOC tclose( "chapter" ), "\n"; 
  }
  
  sub printNodeHier
***************
*** 99,116 ****
  	
  	print DOC topen( "table", "TocEntry", 1, "PgWide", 1, "ColSep", 0 ),
  		tblk( "title", $lib.' classes' ),
! 		tblk( "tgroup" );
  
  	my @clist = ();
  	kdocAstUtil::makeClassList( $rootnode, \@clist );
  
  	foreach my $kid ( @clist ) {
! 		print DOC '<ROW><ENTRY>', refName( $kid ),'</ENTRY>',
! 			'<ENTRY>', deref( $kid->{DocNode}->{ClassShort},
! 				$rootnode), tclose( "Entry", "Row" );
  	}
  
! 	print DOC tclose( "TBody", "TGroup", "Table", "chapter" );
  }
  
  sub printClassDoc
--- 99,117 ----
  	
  	print DOC topen( "table", "TocEntry", 1, "PgWide", 1, "ColSep", 0 ),
  		tblk( "title", $lib.' classes' ),
!                 topen( "tgroup" ), topen( "tbody" );
  
  	my @clist = ();
  	kdocAstUtil::makeClassList( $rootnode, \@clist );
  
  	foreach my $kid ( @clist ) {
! 		print DOC topen ("Row"), 
!                           topen("Entry"), refName( $kid ), tclose("Entry"), "\n",
! 			  topen("Entry"), deref( $kid->{DocNode}->{ClassShort},
! 				$rootnode), tclose( "Entry", "Row" ), "\n";
  	}
  
! 	print DOC tclose( "tbody", "tgroup", "table", "chapter" ), "\n";
  }
  
  sub printClassDoc
***************
*** 124,130 ****
  		docChildren( $node );
  	}
  
! 	print DOC "</chapter>\n";
  }
  
  sub docChildren
--- 125,131 ----
  		docChildren( $node );
  	}
  
! 	print DOC tclose( "table", "chapter" ), "\n";
  }
  
  sub docChildren
***************
*** 146,154 ****
  	
  	## document self and children
  	
! 	print DOC '<Sect1 id="doc-', fullName( $node, '-' ), 
! 		'" XRefLabel="', fullName( $node, "::") ,'">', "\n",
! 		tblk( "title", $node->{NodeType}." ".fullName( $node ) );
  
  	# TODO Warnings, notes etc
  
--- 147,155 ----
  	
  	## document self and children
  	
! 	print DOC '<Sect1 id="doc-', escapeSGML( fullName( $node, '-' ) ), 
! 		'" XRefLabel="', escapeSGML( fullName( $node, "::") ) ,'">', "\n",
! 		tblk( "title", $node->{NodeType}." ". fullName( $node, "::" ) );
  
  	# TODO Warnings, notes etc
  
***************
*** 256,262 ****
  
  		print CLASS topen( 'Table', 'PgWide', "1", "colsep", "0" ),
  			tblk( 'Title', $lib. ' classes' ),
! 			topen( "TGroup", "cols", "2" ), tclose( "TBody>" );
  
  		foreach $pnode ( @paramlist ) {
  			print CLASS "<ROW><ENTRY>", esc($pnode->{Name}),
--- 257,263 ----
  
  		print CLASS topen( 'Table', 'PgWide', "1", "colsep", "0" ),
  			tblk( 'Title', $lib. ' classes' ),
! 			topen( "TGroup", "cols", "2" ), tclose( "TBody" );
  
  		foreach $pnode ( @paramlist ) {
  			print CLASS "<ROW><ENTRY>", esc($pnode->{Name}),
***************
*** 342,351 ****
  {
  	my( $node ) = @_;
  
! 	return fullName( $node ) if defined $node->{ExtSource}
  		|| !kdocAstUtil::hasDoc( $node );
  
! 	return "<xref LinkEnd=\"doc-".fullName( $node, "--")."\">";
  }
  
  sub fullName
--- 343,353 ----
  {
  	my( $node ) = @_;
  
! 	return escapeSGML( fullName( $node, "--" ) ) if defined $node->{ExtSource}
  		|| !kdocAstUtil::hasDoc( $node );
  
! 	return "<xref LinkEnd=\"doc-" .
!                escapeSGML(fullName( $node, "--")) . "\">";
  }
  
  sub fullName
***************
*** 357,362 ****
--- 359,372 ----
  	return fullName( $node->{Parent}, $sep ).$sep.$node->{astNodeName};
  }
  
+ 
+ sub escapeSGML
+ {
+     my ( $name ) = $_[0];
+     $name =~ s/_/.-/g;
+     return $name;
+ }
+ 
  sub print
  {
  	
***************
*** 449,455 ****
  
  sub tblk
  {
! 	my ( $tag, $text );
  	return "<$tag>".$text."</$tag>";
  }
  
--- 459,465 ----
  
  sub tblk
  {
! 	my ( $tag, $text ) = @_;
  	return "<$tag>".$text."</$tag>";
  }
  

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic