Last active
December 21, 2015 23:59
-
-
Save AmrEldib/6386145 to your computer and use it in GitHub Desktop.
ConvertAllXsdToHtml.ps1Converts XSD files in the same folder to HTML files using a style sheet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scriptpath = $MyInvocation.MyCommand.Path | |
$executionFolder = Split-Path $scriptpath | |
$executionFolder = $executionFolder + "\" | |
$stylesheet = $executionFolder + "xs3p.xsl" | |
$Exe = $executionFolder + "msxsl.exe" | |
#Function to Convert XSD files to HTML | |
function Run-MsXsl ($XsdFile) | |
{ | |
"Converting file: " + $XsdFile | |
$HtmlFile = $XsdFile + "_Docuementation.html" | |
"To: " + $HtmlFile | |
& $Exe $XsdFile $stylesheet -o $HtmlFile | |
} | |
#Print execution folder | |
"Execution folder is: $executionFolder" | |
#Get XSD files in folder | |
$fileEntries = [IO.Directory]::GetFiles($executionFolder, "*.xsd"); | |
#Convert each file | |
foreach($fileName in $fileEntries) | |
{ | |
Run-MsXsl($fileName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment