IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

RaptorXML shell command with wildcards possible? Options · View
c.adam
Posted: Thursday, May 4, 2017 12:51:57 PM
Rank: Member

Joined: 11/17/2016
Posts: 12
Location: DE
Hello,

is it possible to use wildcards (*) in Windows RaptorXML command line parameter?

Example:

RaptorXML.exe xslt --xslt-version=2 --input=E:\Input\Input*.xml --output=E:\Output\Output*.xml MappingMapToCarLoAuftragIn.xslt


Thank you.
vlad
Posted: Friday, May 5, 2017 3:26:03 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
No, definitely not. This would require RaptorXML guessing how to build output file name depending on the input file name and placement of the wildcard.

As far as I know, it should be possible to write a small XSLT file instead, which reads input directory and outputs one file for each input file. There you can have whole control about output file name generation
c.adam
Posted: Friday, May 5, 2017 7:06:25 AM
Rank: Member

Joined: 11/17/2016
Posts: 12
Location: DE
Hello,

Thank you for your feedback. Do you know about an example for this anywhere? Here in the forum search I was not able to find anything.


Kind regards
c.adam
Posted: Friday, May 5, 2017 7:46:39 AM
Rank: Member

Joined: 11/17/2016
Posts: 12
Location: DE
Hello,

I found another solution: I'm running a Windows batch command before doing the RaptorXML command which always picks the oldest file out of my directory, moves it to another folder and renames it to a fixed name. RaptorXML is then pointing on this file with the fixed file name.

Here is the Windows batch command to achieve it:

Code:
for /f "delims=" %%a in (
    'dir /b /a-d /tw /od "E:\Directory1\*.xml"'
) do move "E:\Directory1\%%a" "E:\Directory2\FixedName.xml" & goto fileMoved
:fileMoved



Kind regards
vlad
Posted: Friday, May 5, 2017 7:51:30 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
This has nothing to do with this forum, but with XSLT knowledge.

With fn:collection you should be able to retrieve file contents of your input files.
With xsl:result-document you can produce different result documents for each of them
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.