|
Catrina; Is there any processing of the variable
between its creation and when it is used in the input/output
module. At this point, we can't reproduce what you are reporting.
Attached is a test case that works as expected. If you can modify this to fail as your script does, then we should be able to isolate the issue. Follow these steps: 1. Create a project named NewProject 2. Run the ExportToRDF script 3. Run the ImportRDFFromWorkspace script You can look at these scripts in SPARQLMotion. The first will create a file path with various camel case and space formats. This creates the filepath correctly. The second uses the same pathname, bound from the the same BindBySelect query. -- Scott On 8/15/11 8:12 AM, Catrina wrote: --A similar issue occurs when using a variable in the sml:sourceFilePath property and Import modules.In this example, I set a variable for the project workspace's directory and another for the input xml file. But, when the sml:ImportXMLFile module attempts to import the file, it's trying to get a file out of the directory where the script resides and the file separators in my variables are resolved to underscores. These problems cause an issue for a large number of our scripts. All of which worked prior to TB 3.5.x. Thanks, Catrina On Aug 15, 7:34 am, Catrina <[email protected]> wrote:When using the various Export SPARQLMotion modules, it is common for us to set the sml:targetFilePath property with a variable storing the absolute path in the project's workspace. However, in TopBraid 3.5.1, all of these values appear to be getting resolved incorrectly with underscores in place of the file separator. This issue has caused every SPARQLMotion script containing an export module to break. For example, my variable is set to something like the following: - logFile = /MyProject/MyLogs/Log_TESTING.txt However, the text file was written to: /WhereeverTheScriptResides/_MyProject_MyLogs_Log_TESTING.txt Thanks, Catrina You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en |
# Saved by TopBraid on Mon Aug 15 11:41:32 CDT 2011 # baseURI: http://support.tq.com/unnamed1 # imports: http://topbraid.org/sparqlmotionlib @prefix : <http://support.tq.com/unnamed1#> . @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . @prefix kennedys: <http://topbraid.org/examples/kennedys#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix sm: <http://topbraid.org/sparqlmotion#> . @prefix sml: <http://topbraid.org/sparqlmotionlib#> . @prefix sp: <http://spinrdf.org/sp#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://support.tq.com/unnamed1> rdf:type owl:Ontology ; owl:imports <http://topbraid.org/sparqlmotionlib> ; owl:versionInfo "Created with TopBraid Composer"^^xsd:string . :ApplyConstruct_1 rdf:type sml:ApplyConstruct ; rdfs:label "Apply construct 1"^^xsd:string ; sm:next :ImportRDFFromWorkspace_1 ; sm:nodeX 358 ; sm:nodeY 195 ; sml:replace "true"^^xsd:boolean . :BindBySelect_1 rdf:type sml:BindBySelect ; rdfs:label "Bind by select 1"^^xsd:string ; sm:next :ApplyConstruct_1 , :ExportToRDFFile_1 ; sm:nodeX 150 ; sm:nodeY 159 ; sml:selectQuery [ rdf:type sp:Select ; sp:resultVariables (_:b1) ; sp:where ([ rdf:type sp:Bind ; sp:expression "/NewProject/SomeFolderForTest/Test_Folder/Folder with blank/abc/zzz.ttl" ; sp:variable _:b1 ]) ] . :ExportToRDFFile_1 rdf:type sml:ExportToRDFFile ; rdfs:label "Export to RDFFile 1"^^xsd:string ; sm:nodeX 295 ; sm:nodeY 431 ; sml:baseURI "http://abc.com/xyz"^^xsd:string ; sml:targetFilePath [ sp:varName "filename"^^xsd:string ] . :Function_1 rdf:type sm:Function ; rdfs:subClassOf sm:Functions . <http://support.tq.com/unnamed1#Import-kennedys.rdf_1> rdf:type sml:ImportRDFFromWorkspace ; rdfs:label "Import kennedys.rdf"^^xsd:string ; sm:next :BindBySelect_1 ; sm:nodeX 93 ; sm:nodeY 26 ; sml:baseURI "http://topbraid.org/examples/kennedys"^^xsd:string . :ImportRDFFromWorkspace_1 rdf:type sml:ImportRDFFromWorkspace ; rdfs:label "Import RDFFrom workspace 1"^^xsd:string ; sm:nodeX 600 ; sm:nodeY 195 ; sml:ignoreImports "false"^^xsd:boolean ; sml:sourceFilePath [ sp:varName "filename"^^xsd:string ] . _:b1 sp:varName "filename"^^xsd:string .
