# HG changeset patch # User Bob Rosenberg # Date 1285692531 -3600 # Node ID 0f44a943faf9332f876a15899a530203dc81cec1 # Parent cb270197b3948de7690ff656749ff501e37ec58b System model generator bug fixes for merging and dependencies. Support for 3.0.1 syntax. Catch up with sysdeftools. diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/core/draw-model.xsl --- a/sysmodelgen/core/draw-model.xsl Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/core/draw-model.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -343,6 +343,7 @@ + @@ -763,7 +764,6 @@ - diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/core/draw.xsl --- a/sysmodelgen/core/draw.xsl Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/core/draw.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -28,7 +28,9 @@ 7.0 7.0s 8.0 8.0a 8.0b8.1 8.1a 8.1b 9.0 9.1 9.2 9.3 - 9.4 ^1tb91 ^2 tb92 9.5 ^3 tb101 9.6 ^4 Future + 9.4 ^1tb91 ^2 tb92 9.5 ^3 tb101 9.6 ^4 + ^5 ^6 ^7 ^8 ^9 ^10 + Future diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/core/joinsysdef-module.xsl --- a/sysmodelgen/core/joinsysdef-module.xsl Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/core/joinsysdef-module.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -20,7 +20,14 @@ - ERROR: Cannot process this document + + ERROR: Cannot process this document () + + . Unrecognised syntax schema="" + . Missing schema + . Invalid file type: + + @@ -47,7 +54,7 @@ - Cannot set "", already set + Note: Cannot set "", already set on . Ignoring linked value @@ -126,19 +133,23 @@ - + + - + + + Note: The link to from could not be resolved. Perhaps there's an error in the XML? + - + @@ -205,7 +216,8 @@ - + + @@ -320,6 +332,7 @@ + @@ -451,11 +464,9 @@ - - @@ -479,95 +490,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - / - - - - - - - - - - - - - - - - - - - - - ../ - - - - - - - - - - - / - - - - - - - - - - - - - - - - - - - - / - - - - - - - - - - + diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/core/joinsysdef.xsl --- a/sysmodelgen/core/joinsysdef.xsl Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/core/joinsysdef.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -14,9 +14,17 @@ Create a stand-alone sysdef from a linked set of fragments --> - + + /os/deviceplatformrelease/foundation_system/system_model/system_definition.xml + diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/core/mergesysdef-module.xsl --- a/sysmodelgen/core/mergesysdef-module.xsl Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/core/mergesysdef-module.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -10,7 +10,10 @@ Nokia Corporation - initial contribution. Contributors: Description: - XSLT module for merging only two sysdef files according to the 3.0.0 rules. Old syntax not supported and must be converetd before calling. + XSLT module for merging only two sysdef files according to the 3.0.1 rules. + 2.x and older syntax not supported and must be converted before calling. + + Requires the including XSLT to also include path-module.xsl --> http://www.symbian.org/system-definition @@ -42,7 +45,7 @@ - + @@ -135,7 +138,13 @@ - + + + + + + + @@ -183,6 +192,7 @@ + @@ -192,6 +202,7 @@ + @@ -199,7 +210,16 @@ + + + + + + + + + @@ -235,7 +255,7 @@ - Note: levels differ "" vs "" + Note: levels differ "" vs "" on @@ -252,67 +272,16 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + @@ -353,47 +322,94 @@ + + + + + + + + + + + + + + + + + - - - - - - - - + + Note: "" in "" + overridden in downstream sysdef + replaced by "" in "" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + + + + + - + + - @@ -410,9 +426,16 @@ - + + + + + + + + @@ -435,27 +458,24 @@ + - + + - - - - - - - - + + + @@ -464,10 +484,11 @@ - + + - + Warning: "" moved in downstream model. Ignoring moved @@ -478,6 +499,7 @@ + @@ -489,12 +511,10 @@ - - - - - - + + + + @@ -502,17 +522,31 @@ + + + - - + + + + + + + + + + + + + + - @@ -522,12 +556,10 @@ - - - - - - + + + + @@ -536,10 +568,63 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ERROR: Could not resolve relative path in downstream file: relative to absolute URI + + + + + + + + + + + diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/core/mergesysdef.xsl --- a/sysmodelgen/core/mergesysdef.xsl Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/core/mergesysdef.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -1,4 +1,4 @@ - + + + + + - mcl/System_Definition_Template.xml + mcl/System_Definition_Template.xml - - @@ -39,6 +47,7 @@ + @@ -53,6 +62,7 @@ + @@ -77,7 +87,21 @@ - + + + + + + + + + + + + + + + @@ -86,7 +110,7 @@ - + @@ -105,5 +129,13 @@ + + + + + + + + diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/core/path-module.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysmodelgen/core/path-module.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + + + + + + + + + + + + + + + ../ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/extra/dependencies.xsl --- a/sysmodelgen/extra/dependencies.xsl Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/extra/dependencies.xsl Tue Sep 28 17:48:51 2010 +0100 @@ -175,7 +175,7 @@ - + diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/rsc/ModelTemplate.xml --- a/sysmodelgen/rsc/ModelTemplate.xml Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/rsc/ModelTemplate.xml Tue Sep 28 17:48:51 2010 +0100 @@ -1,5 +1,5 @@ - + diff -r cb270197b394 -r 0f44a943faf9 sysmodelgen/src/SysModelGen.pm --- a/sysmodelgen/src/SysModelGen.pm Wed Sep 22 13:41:43 2010 +0100 +++ b/sysmodelgen/src/SysModelGen.pm Tue Sep 28 17:48:51 2010 +0100 @@ -82,14 +82,14 @@ 'iModel' => { 'param' => "model=s" ,'type'=>'file/uri', 'default' => "$dataroot/ModelTemplate.xml", 'class' => 'Files or URIs', 'desc' => 'The location of the Model XML file to use to build the file. Content of this file will be overridden by anything set on the command line on in an ini file'}, 'iSysDefFile' => { 'param' => "sysdef=s", 'multi' => 1,'type'=>'file/uri', 'xpath' => '/model/sysdef', - 'class' => 'Model Control', 'desc' => 'Comma-separated list of locations for the System Definition XML file(s) used to build the model. Layers in the files will be stacked on top of each other in order, from bottom to top.'}, + 'class' => 'Model Control', 'desc' => 'The System Definition XML file(s) used to build the model.'}, "iSourceRoot" => {'param'=>'srcvar=s' ,'multi' => 1, 'class' => 'Model Control'}, - 'iPathPrefix' => {'param' => 'sysdef-prefix', 'multi' => 1, 'class' => 'Model Control'}, + 'iPathPrefix' => {'param' => 'sysdef-prefix=s', 'multi' => 1, 'class' => 'Model Control','type'=>'file/uri',}, "iSysDefPath" => {'param' => "sysdef-path=s", 'multi' => 1,'type'=>'path', 'class' => 'Model Control', 'desc' => 'The directory which the system definition file should be considered to be in when turning unit\'s relative links into absolute paths. This is only necessary to provide if the result requires the absolute paths to be meaningful. The order of this parameter must match the order of the -sysdef parameter'}, 'iShapes' => { 'param' => "shapes=s", 'xpath' => '/model/@shapes','type'=>'file/uri', - 'class' => 'Files or URIs', 'desc' => 'The location of the Shapes XML file used to provide rules to control the display of the components on the model. If not present, default behaviour (in Shapes.xml) is used. This and the default bahaviours are overrriden by using the -color, -border, -pattern, and -style options. '}, + 'class' => 'Files or URIs', 'desc' => 'The location of the Shapes XML file used to provide rules to control the display of the system model items. If not present, default behaviour (in Shapes.xml) is used. This and the default bahaviours are overrriden by using the -color, -border, -pattern, and -style options. '}, 'iLink' => { 'param' => "link=s", 'xpath' => '/model/@link', 'class' => 'Files or URIs', 'desc' => 'The base URL to use for all hyperlinks in the model. A base URL will be appended by the type and name (e.g. Blocks/Comms%20Services.html) of the items to create the full URL of the linked file. Window directories will be converted into file URIs.'}, 'iLinkExpr' => { 'param' => "link-expr=s", 'multi' => 1, 'xpath' => 'model/link', @@ -107,7 +107,7 @@ 'iCopyright' => { 'param' => "copyright=s", 'default' => (1900+$yr[5])." Nokia Corporation", 'xpath' => '/model/@copyright', 'class' =>"Labels", 'desc' =>'The copyright to appear in the lower left. Set to empty string to leave out.'}, 'iDistribution' => { 'param' => "distribution=s", 'xpath' => '/model/@distribution', - 'class' => "Labels", 'desc' =>'Text to appear on the bottom centre to indicate to whom the model can be show. Informational only. Suggested values are "internal", "secret" or "unrestrictred". Not shown if not set.'}, + 'class' => "Labels", 'desc' =>'Text to appear on the bottom centre to indicate to whom the model can be shown. Informational only. Suggested values are "internal", "secret" or "unrestrictred". Not shown if not set.'}, 'iLgdTitle' => { 'param' => "legend_title=s", 'xpath' => '/model/layout/legend/@label', 'class' =>"Labels", 'desc' =>'The title to appear in the leftmost part of the legend.'}, 'iLgdFloat' => { 'param' => "legend_float=s", 'xpath' => '/model/layout/legend/@float', 'type' => 'boolean', @@ -127,6 +127,8 @@ 'iLevels' => { 'multi' => 1, 'param' => "levels=s",'type'=>'file/uri' , info=>'levels', 'xpath' => '/model/sysdef', 'depr' => "Only works on 2.0 syntax and older models. Use info file instead", 'class' =>'Files or URIs', 'desc' => 'The location of the Levels XML file used to override the stacking of collections. '}, + 'iDepsFile' => { 'multi' => 1, 'param' => "deps=s", 'xpath' => '/model/sysdef','type'=>'file/uri', info=>'extra', + 'class' => 'Files or URIs', 'desc' => 'The location of a sysinfo file containing Dependencies. If not present, dependencies will not be drawn'}, 'iColor' => { 'multi' => 1, 'param' => "color=s", 'xpath' => '/model/layout','type'=>'file/uri', 'info'=>'color', 'class' =>'Files or URIs', 'desc' => 'The location of a Values XML file used to specify per-component colours. If not present, the default colours are used.'}, @@ -166,8 +168,6 @@ 'class' =>'Model Control', 'desc' => 'The width of the drawn image (with units). If not specified it will fit the viewer window. Valid units: "in", "mm", "cm", "px", "pt"'}, 'iStatic' => { 'param' => "static=s", 'type' => 'boolean', 'xpath' => '/model/layout/@static', 'class' =>'Model Control', 'desc' => 'If present, the model will not have any mouseover effects (this is overriden by builing the depmodel).'}, - 'iDepsFile' => { 'param' => "deps=s", 'xpath' => '/model/@deps','type'=>'file/uri', - 'class' => 'Files or URIs', 'desc' => 'The location of the Dependencies XML file used to draw the depmodel. If not present, dependencies will not be drawn'}, 'iPrintResolution' =>{ 'param' => "dpi=s", 'type' => 'number', 'xpath' => '/model/layout/@resolution', 'class' =>'Model Control', 'desc' => 'The DPI to use when printing from the Adobe SVG Viewer. If not present, it will print well at A4 size. A value of 300 will look good on A3 size paper'}, 'iModelFont' =>{'param' => "model_font=s", 'type' =>'font', 'xpath' => '/model/layout/@font', @@ -242,6 +242,14 @@ } } } + + foreach (@ARGV) { + # some MS products replace "-" with en-dash in an effort to be "intelligent". + # This replaces all leading en-dashes in the command line with "-" + # There is a small risk that the en-dash is intentional and this will clobber it. + s/^\x96/-/; + } + GetOptions(%opt); if ($self->{'iHelp'}) @@ -598,7 +606,7 @@ print XSLT ' ',$basedir,'/ -