Stream: implementers
Topic: IG Publisher pre-processing
Stephen Royce (Aug 07 2017 at 02:56):
I have 2 questions regarding pre-processing in the IG Publisher:
- If one has access to Saxon, is there anyway to swap out the Apache-derived (I presume) XSL engine with Saxon so that one could use XSL 2.0?
- If I use pre-processing to create UML SVG, can I use the name format that the publisher uses, i.e.
[type]-[id]-uml.xhtml
, or will these get wiped out by the IG Publisher and so I should some other file name construct?
Grahame Grieve (Aug 07 2017 at 03:01):
first: we hate saxon because of it's weird deployment issues
Grahame Grieve (Aug 07 2017 at 03:02):
that's not a no, but I'm just not interested in supporting saxon for the IG publisher unless someone funds it
Grahame Grieve (Aug 07 2017 at 03:02):
I don't know about the names
Grahame Grieve (Aug 07 2017 at 03:02):
you'd have to try
Stephen Royce (Aug 07 2017 at 03:12):
Thanks.
Stephen Royce (Aug 07 2017 at 03:12):
One more thing: what's the actual input to the pre-process XSL?
Grahame Grieve (Aug 07 2017 at 03:45):
you'll have to askLloyd
Grahame Grieve (Aug 07 2017 at 03:45):
@Lloyd McKenzie - question for you
Lloyd McKenzie (Aug 07 2017 at 04:31):
The input is the XHTML page files. You can use the transform to assign section headings and the like. I'll send you the one I use.
Stephen Royce (Aug 07 2017 at 07:02):
Thanks @Lloyd McKenzie . :simple_smile:
Should I expect to have seen something in my e-mail inbox?
Stephen Royce (Aug 07 2017 at 07:23):
I assume that input means you don't have direct access to the actual StructureDefinition XML.
Lloyd McKenzie (Aug 07 2017 at 20:56):
You should - if you didn't, then I must have the wrong one. Can you PM me the correct one?
Stephen Royce (Sep 05 2017 at 06:40):
Okay, so I _finally_ got around to trying some stuff out here, but I'm confused about a few things. In particular, right now, what do you put in the JSON control file for pre-processing? I put the name of my XSL file in the pre-process.transform
, but then it complained about not having a value for pre-process.folder
. Is this folder the output directory or the input directory? I assume it's the former, so if I want just a trivial, pass-through result, should I set the value to "output" or perhaps "pages"?
Also, I noticed I got an error in the net.sf.saxon
namespace when I used "temp" as the value for pre-process.folder
. Does this mean that Saxon is available? Or is it ancient Saxon (v6.5.5) and so XSLT2 is still not an option?
Lloyd McKenzie (Sep 05 2017 at 13:49):
pre-process.folder is the folder to grab from. pre-process.relativePath is the folder to put the output in (relative to 'temp'). To the best of my knowledge, we can't use XSLT2. Grahame was pretty firm :)
Stephen Royce (Sep 06 2017 at 03:03):
Thanks. So what folder should I be grabbing from? temp
?
Lloyd McKenzie (Sep 06 2017 at 05:00):
Whatever folder contains the files you want to pre-process
Stephen Royce (Sep 06 2017 at 08:08):
How do I find which files are where?
(The ones I'm looking for are the StructureDefinition HTML files which seem to be in temp
, and the profile/extension lists, which I would have thought would be in temp/_includes
but I can't find and which I expect will be difficult to pre-process anyway because they're not well-formed.)
Grahame Grieve (Sep 06 2017 at 08:11):
the files in temp don't exist when pre-processing happens - that's why it's called 'pre-processing'
Lloyd McKenzie (Sep 06 2017 at 13:16):
Pre-processing lets you take source and do something with it before it's used as source for the publication process. For example, I use pre-process to assign section numbers to my pages and mini table-of-contents for the page.
Lloyd McKenzie (Sep 06 2017 at 13:17):
The publisher then uses the transformed files as source for my pages.
Stephen Royce (Sep 07 2017 at 06:38):
@Lloyd McKenzie When you say "source", what exactly do you mean? Is it your own content? If so, what's the point; can't you just include the section numbers in the source at creation? If not, then where is it coming from. I looked at your XSL and I can see what it's doing, but if the HTML source is not the generated content from the IG Publisher, what is it?
BTW, I had thought the "pre" in "pre-processing" meant before Jekyll, not before content creation.
Stephen Royce (Sep 07 2017 at 06:40):
So here's my problem: I want to add some Bootstrap classes to some of the HTML content generated by the IG Publisher, but before it's assembled by Jekyll. Can I use pre-processing to do this, or do I have to write my own post-processor. (I really hope not, because post-processing would amount to screen scraping, and that's really nasty!)
Lloyd McKenzie (Sep 07 2017 at 13:13):
I could include the section numbers in the source at creation, but it's a huge pain and chances of getting them right is slim. Having it done automatically is much easier. The transform step doesn't touch the generated HTML - I have no need to do that. It's to pre-process the various ad-hoc descriptive pages and supporting content. There's presently no way to change the HTML fragments produced by the IG-publisher except by editing the IG-publisher's java code. You can certainly submit a change request asking for what you'd like. If it would have general utility, we'd probably make the change. Or if we could make a transparent change that would allow you to use CSS to drive the desired behavior, that could work too.
Eric Haas (Sep 07 2017 at 18:24):
There is a resource variable index for each structuredefinition which is shown here which you can use in the templates to creates section numbers.
Stephen Royce (Sep 08 2017 at 00:33):
Blast!
But maybe there's a silver lining: does this mean that I can use pre-processing on the items in the resources
directory to do things like create my own UML SVG fragments?
Grahame Grieve (Sep 08 2017 at 03:01):
yes that you can do
Parijat Kar (Sep 10 2017 at 16:37):
How to use HAPI FHIR APIs: http://hapifhir.io/doc_rest_client.html
Parijat Kar (Sep 10 2017 at 16:38):
Server used: http://fhirtest.uhn.ca/baseDstu3
Last updated: Apr 12 2022 at 19:14 UTC