XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Tone SoutherlandSubject: using Custom Tool - passing arguments
Author: Tone Southerland
Date: 15 May 2008 11:52 AM
Originally Posted: 15 May 2008 11:51 AM
So I've written a .bat file to process a schematron for me, and I can invoke it through Tools->Options->Custom Tools. But how can I pass arguments to it? I've tried various ways of specifying them in the Argument textbox, but nothing seems to work and the Stylus documentation doesn't seem to have much to offer in this. Below is my script file - maybe I missed something in there...


***************************************
@echo off
cls
SET PATH="D:\Schematron"
del schematron_temp.xsl
echo Generating stylesheet from iso_svrl.xsl...
bin\Transform -t %1.sch iso_svrl.xsl >schematron_temp.xsl
echo Processing xml instance against generated stylesheet...
bin\Transform -t %2.xml schematron_temp.xsl >result.html
echo Processing finished
start firefox.exe D:\Schematron\result.html

Postnext
Tone SoutherlandSubject: using Custom Tool - passing arguments
Author: Tone Southerland
Date: 15 May 2008 12:07 PM
So I've figured out how to pass arguments in... below are the values in the Custom Tools fields.

Command: D:\Schematron\schematron_script.bat schematron, xmlinstance
Arguments: ${FileName}${FileName}
Initial Directory: D:\Schematron
Path: D:\Schematron


But I'm still not sure how to change these input arguments at runtime. I want to be able to validate various xml instances against various schematrons so I need a way to prompt for the file names every time I run my schematron validator... or maybe a little dialogue that could navigate to and pick the files. Any ideas

Posttop
Tone SoutherlandSubject: using Custom Tool - passing arguments
Author: Tone Southerland
Date: 15 May 2008 12:11 PM
ok I just saw the Prompt for arguments checkbox. I'm a genious.... (Not sure how I missed that)

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.