Closed ajc158 closed 10 years ago
Yes; undesirable. The main reason for passing MODEL_DIR_XSL_FRIENDLY is so that if the MODEL_DIR contains spaces, these are correctly percent-encoded as %20 and continue to work correctly. It seems that the '/' being percent-encoded is upsetting OSX somehow? I'll try this out on my Mac.
Hmm. I first found this necessary for OUTPUT_DIR, which is passed to the document() function in the xsl script. Passing a space into the document() function caused a problem.
Looking at the script, it may be that we CAN pass a space in where MODEL_DIR is used; the model dir is not passed to the document function.
See line 14 of SpineML_2_BRAHMS_CL_neurons.xsl for the use of document() to process the output dir.
The problem is that when writing the component.cpp file XSLT is just pasting the XML safe version wholesale into the code, % values and all - and C++ doesn't know what to do with these. The lack of the replace function in XSLT 1.0 makes fixing this difficult, although it could be done using string handling in C++...
Commit 7f081a4 in master changes this behaviour. I'll review all the uses of output dir, too.
Confirmed that percent encoding is required in all cases where the output dir is passed to xsl.
The changes to the path lead to incorrect characters being used instead of / on OSX, resulting in an inability to read binary connection files. Fix is to pass MODEL_DIR instead - but this might be undesirable?