OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [dita] Scoped Keyspace Construction Rough Proof-of-Concept


I think I’ve mentioned this before but I don’t see any further mention of it: While we’re at this – will we be able to use this same logic and similar syntax for applying DITAvals?  Many of my projects require setting a scoped DITAval file as well. This allows the use of existing profiled content to be used at several places in a map and produce different output.  Currently there’s no convenient solution for this and it is very similar to the concept of scoped keys.  

 

From: dita@lists.oasis-open.org [mailto:dita@lists.oasis-open.org] On Behalf Of Chris Nitchie
Sent: 24 April 2013 04:25
To: dita TC
Subject: [dita] Scoped Keyspace Construction Rough Proof-of-Concept

 

As a sanity check, I've written a very (very) (very) rough proof-of-concept application that parses a map and compiles the key scopes it contains, then displays the keys defined in those scopes.. I've run all of the examples through it from the proposal through it, plus the TractorX example, plus Eliot's cross-publication linking proof-of-concept, and gotten out more-or-less the right thing (though Eliot's example, with its circular references from 'a' to 'b' and vice-versa, yielded bigger key spaces than I was expecting, I don't think it's wrong).

 

I'm encouraged because while it's rough and simplistic, it's also, I think, logically complete according to the rules outlined in the proposal, and the real workhorse class that does the loading and organizing of the scopes themselves, in KeyScope.java, came in at around 200 lines of code when you discount comments, whitespace, and imports. Any real production implementation will be much larger and more complex, but as a rough proof of concept, it was pretty easy to put together. I probably spent more time gathering and executing the test cases than writing the actual code.

 

It's written in Java, reads the maps with basic DOM API calls, and is built with Apache Maven.

 

For those who are curious, I've posted it up on GitHub, here:

 

 

That main page displays the readme file, which contains the output for all of the test maps.

 

The main class that contains the keyspace-construction logic is here:

 

 

And the test maps are here:

 

 

Chris

Chris Nitchie

Oberon Technologies, Inc.

2640 Wildwood Trail

Saline, MI 48176

Main: 734.666.0400

Direct: 734.330.2978


 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]