This commit is contained in:
parent
668101bf77
commit
124cf71e16
179
PROMS/fmtxml/TranslateDoc.XSL
Normal file
179
PROMS/fmtxml/TranslateDoc.XSL
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
|
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="DocStyles">
|
||||||
|
<DocStyles>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</DocStyles>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="DcStyles">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="DocStyle">
|
||||||
|
<DocStyle>
|
||||||
|
<xsl:apply-templates select="Name"/>
|
||||||
|
<xsl:apply-templates select="Index"/>
|
||||||
|
<xsl:apply-templates select="numberingsequence"/>
|
||||||
|
<xsl:apply-templates select="IsStepSection"/>
|
||||||
|
<xsl:apply-templates select="oldtonew"/>
|
||||||
|
<xsl:apply-templates select="pagestyle"/>
|
||||||
|
<xsl:apply-templates select="dstyle|DocStructStyle|PTopRow|ContStyle|EndStyle|FinalMsg"/>
|
||||||
|
</DocStyle>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="numberingsequence">
|
||||||
|
<xsl:attribute name="NumberingSequence"><xsl:value-of select="."/></xsl:attribute>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="IsStepSection">
|
||||||
|
<xsl:attribute name="IsStepSection"><xsl:value-of select="."/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="oldtonew">
|
||||||
|
<xsl:attribute name="OldToNew"><xsl:value-of select="."/></xsl:attribute>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="dstyle">
|
||||||
|
<xsl:if test="string-length(./FontFamily)+string-length(./FontSize)+string-length(./FontStyle)>0">
|
||||||
|
<Font>
|
||||||
|
<xsl:if test="FontFamily">
|
||||||
|
<xsl:attribute name="Family">
|
||||||
|
<xsl:value-of select="FontFamily"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="FontSize">
|
||||||
|
<xsl:attribute name="Size">
|
||||||
|
<xsl:value-of select="FontSize"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="FontStyle">
|
||||||
|
<xsl:attribute name="Style">
|
||||||
|
<xsl:value-of select="FontStyle"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
</Font>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="PTopRow">
|
||||||
|
<Layout>
|
||||||
|
<xsl:attribute name="TopRow"><xsl:value-of select="."/></xsl:attribute>
|
||||||
|
<xsl:attribute name="FooterLength"><xsl:value-of select="..//FooterLen"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="PageLength"><xsl:value-of select="..//PageLength"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="PageWidth"><xsl:value-of select="..//PageWidth"/></xsl:attribute>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</Layout>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="ContStyle">
|
||||||
|
<xsl:if test="string-length(..//ContTop)+string-length(..//ContBottom)>0">
|
||||||
|
<Continue>
|
||||||
|
<xsl:if test="string-length(./FontFamily)+string-length(./FontSize)+string-length(./FontStyle)>0">
|
||||||
|
<Font>
|
||||||
|
<xsl:if test="FontFamily">
|
||||||
|
<xsl:attribute name="Family">
|
||||||
|
<xsl:value-of select="FontFamily"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="FontSize">
|
||||||
|
<xsl:attribute name="Size">
|
||||||
|
<xsl:value-of select="FontSize"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="FontStyle">
|
||||||
|
<xsl:attribute name="Style">
|
||||||
|
<xsl:value-of select="FontStyle"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
</Font>
|
||||||
|
</xsl:if>
|
||||||
|
<Top>
|
||||||
|
<xsl:if test="..//ContTop != 'empty'">
|
||||||
|
<xsl:attribute name="Message">
|
||||||
|
<xsl:value-of select="../ContTop"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="..//ContTopHLS != 'empty'">
|
||||||
|
<xsl:attribute name="HLS">
|
||||||
|
<xsl:value-of select="..//ContTopHLS"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="..//CTMargin != 'empty'">
|
||||||
|
<xsl:attribute name="Margin">
|
||||||
|
<xsl:value-of select="..//CTMargin"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
</Top>
|
||||||
|
<Bottom>
|
||||||
|
<xsl:if test="..//ContBottom != 'empty'">
|
||||||
|
<xsl:attribute name="Message">
|
||||||
|
<xsl:value-of select="../ContBottom"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="..//CBMargin != 'empty'">
|
||||||
|
<xsl:attribute name="Margin">
|
||||||
|
<xsl:value-of select="..//CBMargin"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="..//CBLoc != 'empty'">
|
||||||
|
<xsl:attribute name="Location">
|
||||||
|
<xsl:value-of select="..//CBLoc"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
</Bottom>
|
||||||
|
</Continue>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="EndStyle">
|
||||||
|
<xsl:if test="../EndString != 'empty'">
|
||||||
|
<End>
|
||||||
|
<xsl:if test="../EndFlag != 'empty'">
|
||||||
|
<xsl:attribute name="Flag">
|
||||||
|
<xsl:value-of select="../EndFlag"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:attribute name="Message">
|
||||||
|
<xsl:value-of select="../EndString"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:if test="string-length(./FontFamily)+string-length(./FontSize)+string-length(./FontStyle)>0">
|
||||||
|
<Font>
|
||||||
|
<xsl:if test="FontFamily">
|
||||||
|
<xsl:attribute name="Family">
|
||||||
|
<xsl:value-of select="FontFamily"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="FontSize">
|
||||||
|
<xsl:attribute name="Size">
|
||||||
|
<xsl:value-of select="FontSize"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="FontStyle">
|
||||||
|
<xsl:attribute name="Style">
|
||||||
|
<xsl:value-of select="FontStyle"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
</Font>
|
||||||
|
</xsl:if>
|
||||||
|
</End>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="FinalMsg">
|
||||||
|
<Final>
|
||||||
|
<xsl:attribute name="Message"><xsl:value-of select="."/></xsl:attribute>
|
||||||
|
</Final>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="DocStructStyle">
|
||||||
|
<StructureStyle>
|
||||||
|
<xsl:attribute name="Where"><xsl:value-of select="DocStyleUse"/></xsl:attribute>
|
||||||
|
<xsl:if test="DocStyle != 'None'"><xsl:attribute name="Style"><xsl:value-of select="DocStyle"/></xsl:attribute></xsl:if>
|
||||||
|
</StructureStyle>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="Name">
|
||||||
|
<xsl:attribute name="Name"><xsl:value-of select="."/></xsl:attribute>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="Index">
|
||||||
|
<xsl:attribute name="Index"><xsl:value-of select="."/></xsl:attribute>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="pagestyle">
|
||||||
|
<xsl:attribute name="PageStyle"><xsl:value-of select="."/></xsl:attribute>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="text()"/>
|
||||||
|
</xsl:stylesheet>
|
BIN
PROMS/fmtxml/TranslateFMT.XSL
Normal file
BIN
PROMS/fmtxml/TranslateFMT.XSL
Normal file
Binary file not shown.
51
PROMS/fmtxml/TranslatePAG.XSL
Normal file
51
PROMS/fmtxml/TranslatePAG.XSL
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||||
|
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="PageStyles">
|
||||||
|
<PageStyles>
|
||||||
|
<xsl:attribute name="Name"><xsl:value-of select="./Name"/></xsl:attribute>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</PageStyles>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="PgStyles">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="PageStyle">
|
||||||
|
<PageStyle>
|
||||||
|
<xsl:attribute name="Name"><xsl:value-of select="./Name"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="Index"><xsl:value-of select="./Index"/></xsl:attribute>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</PageStyle>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="Items">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="PSItem">
|
||||||
|
<Item>
|
||||||
|
<xsl:attribute name="Token"><xsl:value-of select="./Token"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="Row"><xsl:value-of select="./Row"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="Col"><xsl:value-of select="./Col"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="Justify"><xsl:value-of select="./Justify"/></xsl:attribute>
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</Item>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="Style">
|
||||||
|
<xsl:if test="string-length(./FontFamily)+string-length(./FontSize)+string-length(./FontStyle)>0">
|
||||||
|
<Font>
|
||||||
|
<xsl:attribute name="Family">
|
||||||
|
<xsl:value-of select="./FontFamily"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="Size">
|
||||||
|
<xsl:value-of select="./FontSize"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="Style">
|
||||||
|
<xsl:value-of select="./FontStyle"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</Font>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="text()"/>
|
||||||
|
</xsl:stylesheet>
|
77
PROMS/fmtxml/fmtxml.csproj
Normal file
77
PROMS/fmtxml/fmtxml.csproj
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{66A20362-1B7E-4F9D-BABA-86E29EA60994}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<NoStandardLibraries>false</NoStandardLibraries>
|
||||||
|
<AssemblyName>fmtxml</AssemblyName>
|
||||||
|
<RootNamespace>fmtxml</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>.\bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>.\bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="c1.c1pdf, Version=1.1.20052.40, Culture=neutral, PublicKeyToken=bc8d9c59cf1b601f" />
|
||||||
|
<Reference Include="C1.Common, Version=1.0.20031.116, Culture=neutral, PublicKeyToken=e272bb32d11b1948" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="App.ico" />
|
||||||
|
<Content Include="removeempty.xsl" />
|
||||||
|
<Content Include="TranslateDoc.XSL" />
|
||||||
|
<Content Include="TranslateFMT.XSL" />
|
||||||
|
<Content Include="TranslatePAG.XSL" />
|
||||||
|
<Content Include="_UpgradeReport_Files\UpgradeReport.css" />
|
||||||
|
<Content Include="_UpgradeReport_Files\UpgradeReport.xslt" />
|
||||||
|
<Content Include="_UpgradeReport_Files\UpgradeReport_Minus.gif" />
|
||||||
|
<Content Include="_UpgradeReport_Files\UpgradeReport_Plus.gif" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AssemblyInfo.cs" />
|
||||||
|
<Compile Include="EntireFormat.cs" />
|
||||||
|
<Compile Include="FmtFileToXml.cs" />
|
||||||
|
<Compile Include="FmtToXml.cs" />
|
||||||
|
<Compile Include="Form1.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="GenToXml.cs" />
|
||||||
|
<Compile Include="GenXmlToSvg.cs" />
|
||||||
|
<Compile Include="SvgToPdf.cs" />
|
||||||
|
<Compile Include="XmlToPdf.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Form1.resx">
|
||||||
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="licenses.licx" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="TranslateFMT.XSL.bak" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Volian.Utils.Library\CvtFont\CvtFont.csproj">
|
||||||
|
<Project>{652EB5F6-18DD-4F22-9C0B-62EB46613C4D}</Project>
|
||||||
|
<Name>CvtFont</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||||
|
<ProjectExtensions>
|
||||||
|
<VisualStudio AllowExistingFolder="true" />
|
||||||
|
</ProjectExtensions>
|
||||||
|
</Project>
|
10
PROMS/fmtxml/fmtxml.csproj.vspscc
Normal file
10
PROMS/fmtxml/fmtxml.csproj.vspscc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
""
|
||||||
|
{
|
||||||
|
"FILE_VERSION" = "9237"
|
||||||
|
"ENLISTMENT_CHOICE" = "NEVER"
|
||||||
|
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||||
|
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||||
|
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||||
|
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||||
|
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
|
||||||
|
}
|
17
PROMS/fmtxml/removeempty.xsl
Normal file
17
PROMS/fmtxml/removeempty.xsl
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes" indent="yes" />
|
||||||
|
<xsl:strip-space elements="*" />
|
||||||
|
<xsl:template match="*">
|
||||||
|
<xsl:if test="count(@*) > 0 or count(node()) > 0">
|
||||||
|
<xsl:copy>
|
||||||
|
<xsl:apply-templates select="@* | node()" />
|
||||||
|
</xsl:copy>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="@* | text() | processing-instruction()">
|
||||||
|
<xsl:copy />
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user