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)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] 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.