Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EPF » Generating EPF XML Import file from external content
Generating EPF XML Import file from external content [message #51497] Tue, 24 June 2008 14:04 Go to next message
Kristian Mandrup is currently offline Kristian MandrupFriend
Messages: 44
Registered: July 2009
Member
After some hard work I managed to get the "xsmall" (from java.net) XML
pipeline project up and running and integrated with my EPF import
framework in progress.

The cookbook so far is as follows:

1. Recursively iterate all subdirectories from starting directory with
(htm,
html) filter - Use DirectoryWalker with FileFilters (Apache Common IO)
2. For each htm or html file [file], check if <o:DocumentProperties> is
present
(Word htm NOT filtered)
2a. Extract Metadata into [file]-metadata.xml
2b. Extract folder location relative to starting directory for each file
and use this to define package structure (placement) of file. Will
corresponde to package structure in EPF
2c. Set <package> according to package structure from file location (or if
<o:Category> is set, this tag overrules package structure by location!)
2d. If no Metadata present, create default metadata file (using template
in directory or closest parent directory where such a template is present)
2e. Tidy each htm or html file to generate minimalistic xhtml file that
conforms to EPF style guide.
2e. Merge metadata file with xhtml file (using xsmall), creating a
content-file for each
3. Use xsmall pipeline to build one MyPlugin.xml file using all the
content-files as input
4. User must manually load MyPlugin.xml into a Library of choice

Suggestions are welcome!

Kristian
Re: Auto-generating EPF XML plugin file for import from Word documents [message #51779 is a reply to message #51497] Tue, 01 July 2008 14:17 Go to previous messageGo to next message
Kristian Mandrup is currently offline Kristian MandrupFriend
Messages: 44
Registered: July 2009
Member
So far I can generate a valid plguin file that follows the EPF XML schema
(1.5). The generator takes a directory with a bunch of xhtml files (saved
in Microsoft Word) within its subdirectories.

Using the document metadata (File - Properties from within Word), the
filename or nearest folder location the generator creates appropriate
metadata for each such document for use in EPF (used fx to decide what
kind of Method Element to generate!).

Now I am starting to work on a similar approach for defining Custom
Categories (and later Configuration views) using the Word functionality of
"sub documents", so that EPF can reflect and reuse "the MS Word way" of
creating views from various external documents.

Elements in "Standard categories" can link to the Content Elements using a
simple document for each Category Element with hyperlinks referencing the
Content Elements (in the order needed). These will then also be reflected
in EPF.

All this should standardize and facilitate greatly import of external
content into the EPF proces, to avoid the manual effort currently
required, with the inherent limitations and potential for human error.

I also envision a way to check the XML import file against a similar
snapshot XML ekport file of the plugin to be exported and flag to the user
any merge conflicts (or allow "latest date" to override?). Perhaps GUI
enabled!?

More to follow...

Kristian
Re: Auto-generating EPF XML plugin file for import from Word documents [message #51803 is a reply to message #51779] Wed, 02 July 2008 12:38 Go to previous message
Kristian Mandrup is currently offline Kristian MandrupFriend
Messages: 44
Registered: July 2009
Member
This morning I extended my framework so I can now extract subdocument
links and hyperlinks from the Word html files. I then apply some magic to
enable logic links in the xml generated.

For <CustomCategories> the Word subdocument references extracted should
result in child elements
<CategorizedElement>..IDENTIFIER..</CategorizedElement>
where the identifier points to a MethodElement (in the ContentPackage)
with a matching id (within the same EPF XML document).

Same technique should apply for Configurations:
<MethodConfiguration> should have child elements
<ProcessView>..IDENTIFIER..</ProcessView> that each points to a
<ContentCategory xsi:type="uma:CustomCategory" ..> with a matching id.

For other individual MethodElements, fx within the ContentPackage that are
divided into subdocuments there are several possible strategies:
* Merge all subdocuments into one
* generate individual MethodElements for each subdocument (same UMA type
as parent element) and then create links to subdocuments from parent,
eaither at the top or bottom of the MainDescription

Perhaps a config setting should decide which strategy to apply ;)

What do you think?

Kristian
Re: Auto-generating EPF XML plugin file for import from Word documents [message #589802 is a reply to message #51497] Tue, 01 July 2008 14:17 Go to previous message
Kristian Mandrup is currently offline Kristian MandrupFriend
Messages: 44
Registered: July 2009
Member
So far I can generate a valid plguin file that follows the EPF XML schema
(1.5). The generator takes a directory with a bunch of xhtml files (saved
in Microsoft Word) within its subdirectories.

Using the document metadata (File - Properties from within Word), the
filename or nearest folder location the generator creates appropriate
metadata for each such document for use in EPF (used fx to decide what
kind of Method Element to generate!).

Now I am starting to work on a similar approach for defining Custom
Categories (and later Configuration views) using the Word functionality of
"sub documents", so that EPF can reflect and reuse "the MS Word way" of
creating views from various external documents.

Elements in "Standard categories" can link to the Content Elements using a
simple document for each Category Element with hyperlinks referencing the
Content Elements (in the order needed). These will then also be reflected
in EPF.

All this should standardize and facilitate greatly import of external
content into the EPF proces, to avoid the manual effort currently
required, with the inherent limitations and potential for human error.

I also envision a way to check the XML import file against a similar
snapshot XML ekport file of the plugin to be exported and flag to the user
any merge conflicts (or allow "latest date" to override?). Perhaps GUI
enabled!?

More to follow...

Kristian
Re: Auto-generating EPF XML plugin file for import from Word documents [message #589811 is a reply to message #51779] Wed, 02 July 2008 12:38 Go to previous message
Kristian Mandrup is currently offline Kristian MandrupFriend
Messages: 44
Registered: July 2009
Member
This morning I extended my framework so I can now extract subdocument
links and hyperlinks from the Word html files. I then apply some magic to
enable logic links in the xml generated.

For <CustomCategories> the Word subdocument references extracted should
result in child elements
<CategorizedElement>..IDENTIFIER..</CategorizedElement>
where the identifier points to a MethodElement (in the ContentPackage)
with a matching id (within the same EPF XML document).

Same technique should apply for Configurations:
<MethodConfiguration> should have child elements
<ProcessView>..IDENTIFIER..</ProcessView> that each points to a
<ContentCategory xsi:type="uma:CustomCategory" ..> with a matching id.

For other individual MethodElements, fx within the ContentPackage that are
divided into subdocuments there are several possible strategies:
* Merge all subdocuments into one
* generate individual MethodElements for each subdocument (same UMA type
as parent element) and then create links to subdocuments from parent,
eaither at the top or bottom of the MainDescription

Perhaps a config setting should decide which strategy to apply ;)

What do you think?

Kristian
Previous Topic:Re-use RichTextEditor in a non-EPF plugin
Next Topic:EPF+ JAZZ
Goto Forum:
  


Current Time: Tue Apr 16 18:41:24 GMT 2024

Powered by FUDForum. Page generated in 0.19489 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top