cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

relative paths in schematron includes

BrianJ
3-Visitor

relative paths in schematron includes

Anyone used the new schematron abilities? I'm trying to utilize the
<include> tag in a schematron file, but run into problems when I try it
with a relative path.
I have the main schematron file in the custom/doctype directory and I
want to point to file in another directory under the custom directory,
like this:
<include href="../../schematron/diagnostics.sch"/">

I got it to work with the full path, like this:
<include href="C:/Projects/XXXXX/custom/schematron/diagnostics.sch"/">

I've tried the relative path as being relative from the main schematron
file and also from the xml document being validated.
Any ideas? I haven't tried using the catalog for this, does anyone know
if that's possible?
--



Brian Jensen
bjensen@bluelid.com

2 REPLIES 2
ebenton
1-Newbie
(To:BrianJ)

Greetings,
Our FOSI has several e-i-c's that contain an <att> with a <fillval> that calls an ACL function, which in turn calls a VB function to obtain a string of text. The return from this ACL is used by the FOSI to populate a text variable.
In those e-i-c's which are EMPTY elements, for some reason, the ACL is executed twice. This does not happen in elements with both a start and end tag. It only happens in EMPTY elements.
We would like to stop this "double-execution" in EMPTY elements. Does anyone have an explanation or even a good theory on this?

bibach
1-Newbie
(To:BrianJ)

I think, as a general rule, there are no guarantees about how many times
such a function might be called, since the formatter may do multiple
passes, or even back up and try again within the same pass, in some cases
(not sure if the FOSI engine does this, but other formatting engines
certainly do).

If you can't make the VB function resilient to multiple calls, you could
handle it in the ACL function by maintaining an associative array, keyed on
the OID, which caches the result of the previous call and returns that
instead of calling the VB function again. You'd have to flush the array
between publishing runs, perhaps by using the formatcompletehook to detect
when the run is finished.

-Brandon 🙂


Top Tags