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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + Displaying Base64Binary as Ima... (6)
-> - probleme de representation d'i... (1)
-> + SS 2008 error message not disp... (8)
-> + XQuery external variable conve... (4)
-> + encodings available (3)
-> + stand-alone application file n... (4)
-> + Windows Installer Dialog Box a... (4)
-> + Block search and replace (2)
-> + Problem with validation (3)
-> + ISA12 vs GS08 (5)
-> + Web Service Call failure... an... (11)
-> + Quotes in xpath query (3)
-> + Java Built-in processor no lon... (6)
-> + Dynamic input and output names (8)
-> + Java built-in parser (3)
-> + Contains an invalid path (2)
-> + Wizard XML Schema to XML (2)
-> + XML to EDI (14)
-> + Computer with original install... (2)
-> - using Custom Tool - passing ar... (3)
-> ->using Custom Tool - passi...
-> ->using Custom Tool - passi...
-- Previous [1141-1160] [1161-1180] [1181-1200] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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)

   
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.