I'm assuming you're trying to extra data from the .orm file, not the HTML report, which would be very difficult to query.
NORMA installs schema files for all XML elements. If you have the .orm file open in an XML editor in VS, then right click on an orm-prefixed element (orm:EntityType, for example) and choose 'GoTo Definition' to open the schema file. Of course, you also get IntelliSense help in the XML file itself (click on EntityType and type Control-J, you'll see the possible element names for this position).
All elements in the orm:ORMModel section fall into three categories:
-
An element with an @id attribute forms the primary definition for an element
-
An element with a @ref attribute references the secondary element. If a @ref element also has an @id, then the @id is the primary definition for the relationship (think objectification).
-
Any element with @id or @ref describes the relationship between elements
There are a few other file standards (any attribute that starts with an _ is derived, both ends of some relationships are serialized for convenience (orm:EntityType/orm:PlayedRoles is redundant with orm:Fact/orm:FactRoles/orm:Role/orm:RolePlayer, for example)). The Ctrl-F3 command (search for word under cursor) is your friend: click on the first part of and id or ref and type Ctrl-F3 to see where else it is used. If you don't have the XPathMania package installed in VS I'd recommend doing so to help with xpath work (Google XPathMania 2008 to find a VS2008 version I posted in 2007).
The following xpath will find all non-ValueTypes that have a definition:
*/orm:ORMModel/orm:Objects/orm:*[self::orm:EntityType or self::orm:ObjectifiedType][orm:Definitions/orm:Definition]
You can get more advanced with some inner queries as well. This gets all FactTypes that are not part of the preferred identifier for any entity type.
*/orm:ORMModel/orm:Facts/orm:Fact[not(orm:FactRoles/orm:Role[@id=../../../../orm:Constraints/orm:UniquenessConstraint[@id=../../orm:Objects/orm:*[self::orm:EntityType or self::orm:ObjectifiedType]/orm:PreferredIdentifier/@ref]/orm:RoleSequence/orm:Role/@ref])]
However, straight xpath is rather limiting, you need to get an xsl transform running so that you can define some variables and refine your output. Excel is not going to be able to read these files easily, there are just too many references.
I'm the first to admit that the schema file is not a strong part of the product. If you questions on individual elements please let me know.
-Matt
PS Please note that we will be doing a new file format at some point, at which point a lot of the tag names will change, but most of the structure will remain consistent. We've been holding off on this for a while to not cause folks pain more than once and will obviously let you know when it happens. Some tag names are just wrong (Facts/Fact instead of FactTypes/FactType, etc). We've also left a few things in the schema (IsPrimary on a SubtypeFact, for example) to allow files to read in, but we don't write these attributes to write back out.