2012-02-14 15 views
1

私は奇妙な問題に遭遇しました。私はターゲットXMLを生成するためにソースXMLに適用されるXSLTファイルを持っています。 は、ここで私は.NETでXSLT変換が失敗する

 XslCompiledTransform myXslTransform; 
     myXslTransform = new XslCompiledTransform(); 
     string xsltPath = @"..\Support\CustomerXMlTransform.xslt"; 
     myXslTransform.Load(xsltPath); 
     string tempPath = "C:\Transformed.XML"; 
     myXslTransform.Transform(xmlFilePath, tempPath); 

のVisual Studio(VS 2010を実行している)を介して実行したときにこれは完全に正常に動作を使用していたコードです。 私は(VSから作成)インストーラからアプリを実行しようとXMLを渡されると、変換されたXMLは一つだけのタグを持っており、ソースタグからのすべての値がそのように...

<?xml version="1.0" encoding="utf-8"?> 
<ProjectManagement> 

    004 Some 
    Project Description 
    7230652 
    898808 
    676 
    2003 
    003 
    Customer Article Description 

</ProjectManagement> 
のように出て吐出しています

より多くの値がありますが、ここで削除しました。報告された値のタグは表示されませんが、部分出力のようです。

ここで何が起こっているのは誰でも知っていますか?よろしくです。 よろしくお願いします。

インストールフォルダを確認して、System.XmlファイルとSystem.Xml.Linq.dllファイルが見つからないことが判明しました。これらはプロジェクトで参照されるファイルです。これら2つのファイルをインストールフォルダに手動でコピーしました。まだノードなしの同じ結果!ここで

は、VS 2010から正常に動作しますが、インストーラで失敗XSLTです:

<?xml version="1.0" ?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    <xsl:output method="xml" indent="yes"/> 
    <xsl:template match="/"> 
    <ProjectManagement> 
     <xsl:apply-templates/> 
    </ProjectManagement> 
    </xsl:template> 
    <xsl:template match="kalkulation"> 
    <Project> 
     <ProjectCategoryName>WellTeam</ProjectCategoryName> 
     <ProjectNumber> 
     <xsl:attribute name="attributename">ProjectNumber</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="projektnummer"/> 
     </ProjectNumber> 
     <ProjectName> 
     <xsl:if test="string-length(projektnummer)!=0"> 
      <xsl:if test ="string-length(kunden_kurzbezeichnung)!=0"> 
      <xsl:if test ="string-length(kunden_artikel_bezeichnung)!=0"> 
       <xsl:value-of select="concat(projektnummer,'',kunden_kurzbezeichnung,'',kunden_artikel_bezeichnung)"/> 
      </xsl:if> 
      </xsl:if> 
     </xsl:if> 
     </ProjectName> 
     <TemplateName> 
     <xsl:choose> 
      <xsl:when test="u_firma=003 and material_gruppe = 0321">Group1</xsl:when> 
      <xsl:when test="u_firma=004 and material_gruppe = 0321">Group2</xsl:when> 
      <xsl:otherwise>Group1</xsl:otherwise> 
     </xsl:choose> 
     </TemplateName> 
     <CalculationNumber> 
     <xsl:attribute name="attributename">CalculationNumber</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="kalkulationsnummer"/> 
     </CalculationNumber> 
     <CalculationSubNumber> 
     <xsl:attribute name="attributename">CalculationSubNumber</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="kalkulations_u_nummer"/> 
     </CalculationSubNumber> 
     <Mandator> 
     <xsl:attribute name="attributename">Mandant</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue">676</xsl:attribute> 
     <xsl:value-of select="substring(mandant,0,3)"/> 
     </Mandator> 
     <CompanyName> 
     <xsl:attribute name="attributename">CompanyName</xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue">100</xsl:attribute> 
     <xsl:value-of select="substring(firma,0,4)"/> 
     </CompanyName> 
     <CompanySubName> 
     <xsl:attribute name="attributename">CompanySubName</xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(u_firma,0,4)"/> 
     </CompanySubName> 
     <ArticleIndication> 
     <xsl:attribute name="attributename">ArticleIndication</xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(bezeichnung,0,40)"/> 
     </ArticleIndication> 
     <PartNumber> 
     <xsl:attribute name="attributename">PartNumber</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue">0</xsl:attribute> 
     <xsl:value-of select="teilenummer"/> 
     </PartNumber> 
     <DueDate> 
     <xsl:attribute name="attributename"></xsl:attribute> 
     <xsl:attribute name="type"></xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="faelligkeitsdatum"/> 
     </DueDate> 
     <InsideSalesPerson1> 
     <xsl:attribute name="attributename">InsideSalesPerson1</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(sachbearbeiter1,0,20)"/> 
     </InsideSalesPerson1> 
     <InsideSalesPerson2> 
     <xsl:attribute name="attributename">InsideSalesPerson2</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(sachbearbeiter2,0,20)"/> 
     </InsideSalesPerson2> 
     <SalesPerson> 
     <xsl:attribute name="attributename">SalesPerson</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(vertreter_kunde,0,60)"/> 
     </SalesPerson> 
     <Status> 
     <xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" /> 
     <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" /> 
     <xsl:variable name="status" select="translate(status, $smallcase,$uppercase)" /> 
     <xsl:choose> 
      <xsl:when test="$status='NEW' or $status= 'NEU'">1</xsl:when> 
      <xsl:when test="$status='READY' or $status='FERTIG'">2</xsl:when> 
      <xsl:when test="$status='IN BEARBEITUNG'">3</xsl:when> 
      <xsl:otherwise>0</xsl:otherwise> 
     </xsl:choose>   
     </Status> 
     <StatusText> 
     <xsl:value-of select="status"/> 
     </StatusText> 
     <CustomerNo> 
     <xsl:value-of select="substring(kunden_nummer,0,7)"/> 
     </CustomerNo> 
     <CustomerSubNo> 
     <xsl:attribute name="attributename">CustomerSubNumber</xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="kunden_u_nr"/> 
     </CustomerSubNo> 
     <CustomerShortDesc> 
     <xsl:attribute name="attributename">CustomerDescription</xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(kunden_kurzbezeichnung,0,20)"/> 
     </CustomerShortDesc> 
     <CustomerArticleDescription> 
     <xsl:attribute name="attributename">CustomerArticleDescription</xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(kunden_artikel_bezeichnung,0,255)"/> 
     </CustomerArticleDescription> 
     <CustomerArticleNumber> 
     <xsl:attribute name="attributename">CustomerArticleNumber</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(kunden_artikel_nummer,0,30)"/> 
     </CustomerArticleNumber> 
     <TaskType> 
     <xsl:attribute name="attributename">TaskType</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(aufgabe_art,0,3)"/> 
     </TaskType> 
     <TaskCreator> 
     <xsl:attribute name="attributename">TaskCreator</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(aufgabe_ersteller,0,20)"/> 
     </TaskCreator> 
     <TaskDate> 
     <xsl:attribute name="attributename">TaskDate</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="aufgabe_erstellt_am"/> 
     </TaskDate> 
     <TaskInfo> 
     <xsl:attribute name="attributename">TaskInformation</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(aufgabe_information,0,255)"/> 
     </TaskInfo> 
     <DesignerId> 
     <xsl:attribute name="attributename">TaskSpecialist</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(aufgabe_sachbearbeiter,0,3)"/> 
     </DesignerId> 
     <MixFactor> 
     <xsl:attribute name="attributename">MixedFactor</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="format-number(mengen_faktor,'0.00')"/> 
     </MixFactor> 
     <DivideNumber> 
     <xsl:attribute name="attributename">DivideNumber</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(teilenummer,0,3)"/> 
     </DivideNumber> 
     <ProjectDesc> 
     <xsl:attribute name="attributename">ProjectDescription</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="Projektbezeichnung"/> 
     </ProjectDesc> 
     <MaterialGroup> 
     <xsl:attribute name="attributename">MaterialGroup</xsl:attribute> 
     <xsl:attribute name="type">I</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="substring(material_gruppe,0,3)"/> 
     </MaterialGroup> 
     <MaterialDescription> 
     <xsl:attribute name="attributename"></xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:value-of select="material_bezeichnung"/> 
     </MaterialDescription> 
     <Inactively> 
     <xsl:attribute name="attributename"></xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue">0</xsl:attribute> 
     <xsl:value-of select="inaktiv"/> 
     </Inactively> 
     <ShipManually> 
     <xsl:attribute name="attributename">ShipManually</xsl:attribute> 
     <xsl:attribute name="type">IO</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:value-of select="verlade_manuell"/> 
     </ShipManually> 
     <xsl:text> 
    </xsl:text> 
    </Project> 
    <Documents> 
     <CadDocs> 
     <DesignParams> 
      <Design> 
      <DesignName> 
       <xsl:value-of select="substring(cad_nummer,0,9)"/> 
      </DesignName> 
      <DesignCategoryName>DEFAULT DESIGN CATEGORY</DesignCategoryName> 
      <StandardName> 
       <xsl:value-of select="substring(fefco_nr,0,15)"/> 
      </StandardName> 
      <Board Code=""> 
       <Sort> 
       <xsl:value-of select="substring(sorte_nummer,0,15)"/> 
       </Sort> 
       <Quality> 
       <xsl:value-of select="boardquality"/> 
       </Quality> 
       <Grammage> 
       <xsl:value-of select="boardgrammage"/> 
       </Grammage> 
      </Board> 
      <FluteDirection> 
       <xsl:value-of select="designflutedirection"/> 
      </FluteDirection> 
      <GrainDirection> 
       <xsl:value-of select="designgraindirection"/> 
      </GrainDirection> 
      <MatType> 
       <xsl:value-of select="substring(material_typ,0,3)"/> 
      </MatType> 
      <Length> 
       <xsl:value-of select="laenge"/> 
      </Length> 
      <Width> 
       <xsl:value-of select="breite"/> 
      </Width> 
      <Depth> 
       <xsl:value-of select="hoehe"/> 
      </Depth> 
      </Design> 
     </DesignParams> 
     <xsl:text> 
      </xsl:text> 
     </CadDocs> 
    </Documents> 
    <DesignOutput> 
     <StandardUsed> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="substring(fefco_nr,0,15)"/> 
     </StandardUsed> 
     <BlankArea> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="0"/> 
     </BlankArea> 
     <AreaRatio> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="0"/> 
     </AreaRatio> 
     <BlankLength> 
     <xsl:attribute name="attributename">BlankLength</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="laengen_zuschnitt"/> 
     </BlankLength> 
     <BlankWidth> 
     <xsl:attribute name="attributename">BlankWidth</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="breiten_zuschnitt"/> 
     </BlankWidth> 
     <ManualCutLength> 
     <xsl:attribute name="attributename">ManualCutLength</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="breiten_laengen_zuschnitt_manuell"/> 
     </ManualCutLength> 
     <FoldedBoxLength> 
     <xsl:attribute name="attributename">LengthOfFoldedBox</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="verlade_laenge"/> 
     </FoldedBoxLength> 
     <FoldedBoxWidth> 
     <xsl:attribute name="attributename">WidthOfFoldedBox</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="verlade_breite"/> 
     </FoldedBoxWidth> 
     <FoldedBoxHeight> 
     <xsl:attribute name="attributename">HeightOfFoldedBox</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="verlade_hoehe"/> 
     </FoldedBoxHeight> 
     <CreaseLength1> 
     <xsl:attribute name="attributename">CreaseLength1</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="bz_riller"/> 
     </CreaseLength1> 
     <CreaseWidth1> 
     <xsl:attribute name="attributename">CreaseWidth1</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="lz_riller"/> 
     </CreaseWidth1> 
     <CreaseLength2> 
     <xsl:attribute name="attributename">CreaseLength2</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="bz_schlitzer"/> 
     </CreaseLength2> 
     <CreaseWidth2> 
     <xsl:attribute name="attributename">CreaseWidth2</xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue">1</xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="lz_schlitzer"/> 
     </CreaseWidth2> 
     <ARDFile> 
     <xsl:value-of select="0"/> 
     </ARDFile> 
     <PDFFile> 
     <xsl:value-of select="0"/> 
     </PDFFile> 
    </DesignOutput> 
    <LayoutParams> 
     <LayoutCategoryID>DEFAULT MANUFACTURING CATEGORY</LayoutCategoryID> 
     <MfgFile Name=""> 
     <TrimTop> 
      <xsl:value-of select="trimtop"/> 
     </TrimTop> 
     <TrimRight> 
      <xsl:value-of select="trimright"/> 
     </TrimRight> 
     <TrimLeft> 
      <xsl:value-of select="trimleft"/> 
     </TrimLeft> 
     <TrimBottom> 
      <xsl:value-of select="trimbottom"/> 
     </TrimBottom> 
     <SheetSizeX> 
      <xsl:value-of select="breiten_zuschnitt_vernutzt"/> 
     </SheetSizeX> 
     <SheetSizeY> 
      <xsl:value-of select="laengen_zuschnitt_vernutzt"/> 
     </SheetSizeY> 
     <GutterX> 
      <xsl:value-of select="gutterx"/> 
     </GutterX> 
     <GutterY> 
      <xsl:value-of select="guttery"/> 
     </GutterY> 
     <GrainDir> 
      <xsl:attribute name="expressionname"></xsl:attribute> 
      <xsl:value-of select="layoutgraindirection"/> 
     </GrainDir> 
     <WastePercentage> 
      <xsl:value-of select="abfall_netto_bogen"/> 
     </WastePercentage> 
     </MfgFile> 
    </LayoutParams> 
    <LayoutOutput> 
     <TrimTop> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="trimtop"/> 
     </TrimTop> 
     <TrimRight> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="trimright"/> 
     </TrimRight> 
     <TrimLeft> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="trimleft"/> 
     </TrimLeft> 
     <TrimBottom> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="trimbottom"/> 
     </TrimBottom> 
     <SheetSizeX> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="breiten_zuschnitt_vernutzt"/> 
     </SheetSizeX> 
     <SheetSizeY> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="laengen_zuschnitt_vernutzt"/> 
     </SheetSizeY> 
     <EdgePunchingLength> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="laengen_zuschnitt_stanzrand"/> 
     </EdgePunchingLength> 
     <EdgePunchingWidth> 
     <xsl:attribute name="attributeid"></xsl:attribute> 
     <xsl:attribute name="type">O</xsl:attribute> 
     <xsl:attribute name="defaultvalue"></xsl:attribute> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="breiten_zuschnitt_stanzrand"/> 
     </EdgePunchingWidth> 
     <NumUps> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="vernutzung"/> 
     </NumUps> 
     <CutSizeX> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="nutzen_breite"/> 
     </CutSizeX> 
     <CutSizeY> 
     <xsl:attribute name="expressionname"></xsl:attribute> 
     <xsl:value-of select="nutzen_laenge"/> 
     </CutSizeY> 
     <MFGFile> 
     <xsl:value-of select="0"/> 
     </MFGFile> 
     <PDFFile> 
     <xsl:value-of select="0"/> 
     </PDFFile> 
     <CF2File> 
     <xsl:value-of select="0"/> 
     </CF2File> 
    </LayoutOutput> 
    </xsl:template> 
</xsl:stylesheet> 

はここに(正常に動作します)VS 2010およびインストーラを使用してテストXMLです:

見つかり
<box_xml> 
    <bsi_cad2box> 
    <projektnummer>004</projektnummer> 
    <Projektbezeichnung>Project Description</Projektbezeichnung> 
    <kalkulationsnummer>7230652</kalkulationsnummer> 
    <kalkulations_u_nummer>898808</kalkulations_u_nummer> 
    <mandant>676</mandant> 
    <firma>2003</firma> 
    <u_firma>003</u_firma> 
    <bezeichnung>Customer Article Description</bezeichnung> 
    <teilenummer>1</teilenummer> 
    <faelligkeitsdatum>2012-01-12T00:00:00</faelligkeitsdatum> 
    <sachbearbeiter1>3009</sachbearbeiter1> 
    <sachbearbeiter2>30</sachbearbeiter2> 
    <vertreter_kunde>201</vertreter_kunde> 
    <status>neu</status> 
    <kunden_nummer>716523</kunden_nummer> 
    <kunden_u_nr>1001</kunden_u_nr> 
    <kunden_kal_key>132132</kunden_kal_key> 
    <kunden_kurzbezeichnung>Maier</kunden_kurzbezeichnung> 
    <kunden_artikel_bezeichnung>Customer Article Description</kunden_artikel_bezeichnung> 
    <kunden_artikel_nummer>TestKdNr 12345</kunden_artikel_nummer> 
    <aufgabe_art>100</aufgabe_art> 
    <aufgabe_erstellt_am>2012-01-12T00:00:00</aufgabe_erstellt_am> 
    <aufgabe_ersteller>100</aufgabe_ersteller> 
    <aufgabe_information>Aufgabeninfo</aufgabe_information> 
    <aufgabe_sachbearbeiter>100</aufgabe_sachbearbeiter> 
    <cad_nummer>00725</cad_nummer> 
    <fefco_nr>2201</fefco_nr> 
    <mengen_faktor>0.00</mengen_faktor> 
    <vernutzung>0</vernutzung> 
    <breite>205.00</breite> 
    <laenge>360.00</laenge> 
    <hoehe>75.00</hoehe> 
    <breiten_zuschnitt>3602</breiten_zuschnitt> 
    <laengen_zuschnitt>2052</laengen_zuschnitt> 
    <breiten_laengen_zuschnitt_manuell>0</breiten_laengen_zuschnitt_manuell> 
    <nutzen_breite>0.00</nutzen_breite> 
    <nutzen_laenge>0.00</nutzen_laenge> 
    <breiten_zuschnitt_vernutzt>4</breiten_zuschnitt_vernutzt> 
    <laengen_zuschnitt_vernutzt>1100</laengen_zuschnitt_vernutzt> 
    <breiten_zuschnitt_stanzrand>0</breiten_zuschnitt_stanzrand> 
    <laengen_zuschnitt_stanzrand>4</laengen_zuschnitt_stanzrand> 
    <sorte_nummer>M-SBS-300</sorte_nummer> 
    <inaktiv>0</inaktiv> 
    <material_typ></material_typ> 
    <material_nummer></material_nummer> 
    <material_gruppe>0321</material_gruppe> 
    <material_bezeichnung></material_bezeichnung> 
    <verlade_breite>0.00</verlade_breite> 
    <verlade_laenge>0.00</verlade_laenge> 
    <verlade_hoehe>0.00</verlade_hoehe> 
    <verlade_manuell>0</verlade_manuell> 
    <bz_riller></bz_riller> 
    <lz_riller></lz_riller> 
    <bz_schlitzer></bz_schlitzer> 
    <lz_schlitzer></lz_schlitzer> 
    <abfall_netto_bogen>19.50</abfall_netto_bogen> 
    <kaschierbogen_sorte_nummer> 
    </kaschierbogen_sorte_nummer> 
    <kaschierbogen_breiten_zuschnitt>0.00</kaschierbogen_breiten_zuschnitt> 
    <kaschierbogen_laengen_zuschnitt>0.00</kaschierbogen_laengen_zuschnitt> 
    <kaschierbogen_breite_zuschnitt_rand>0.00</kaschierbogen_breite_zuschnitt_rand> 
    <kaschierbogen_laengen_zuschnitt_rand>0.00</kaschierbogen_laengen_zuschnitt_rand> 
    <legevariante_nummer> 
    </legevariante_nummer> 
    <druck_ff_nummer> 
    </druck_ff_nummer> 
    <druck_ff_art> 
    </druck_ff_art> 
    <druck_ff_womit> 
    </druck_ff_womit> 
    <ver_ff_nummer> 
    </ver_ff_nummer> 
    <ver_ff_art> 
    </ver_ff_art> 
    <ver_ff_womit> 
    </ver_ff_womit> 
    <stanzen_ff_nummer> 
    </stanzen_ff_nummer> 
    <stanzen_ff_art> 
    </stanzen_ff_art> 
    <stanzen_ff_womit> 
    </stanzen_ff_womit> 
    <kasch_ff_nummer> 
    </kasch_ff_nummer> 
    <kasch_ff_art> 
    </kasch_ff_art> 
    <kasch_ff_womit> 
    </kasch_ff_womit> 
    <bsi_cad2box_ff> 
     <typ>gsm</typ> 
     <text>14.16</text> 
     <n_wert>14.16</n_wert> 
    </bsi_cad2box_ff> 
    <bsi_cad2box_ff> 
     <typ>dru</typ> 
     <text> 
     </text> 
     <n_wert>0.00</n_wert> 
    </bsi_cad2box_ff> 
    <bsi_cad2box_ff> 
     <typ>kas</typ> 
     <text> 
     </text> 
     <n_wert>0.00</n_wert> 
    </bsi_cad2box_ff> 
    <DOKUMENT> 
     <typ> 
     </typ> 
     <name> 
     </name> 
     <version> 
     </version> 
     <erstellungs_datum> 
     </erstellungs_datum> 
     <url> 
     </url> 
    </DOKUMENT> 
    </bsi_cad2box> 
</box_xml> 

バグ、ええ! まず、正しい方向を指してくれたMarcに感謝します。問題はXSLTにありました。値が 'bsi_cad2box'であるべきタグは実際に 'kalkulation'を持っています。 あなたはそこに行く、私は時間のクランチの下にあったので、ボックスから考えることができませんでした。 もう一度おねがいします。

よろしくお願いいたします。

+1

あなたが入力XMLとXSLファイルを提供してもらえますか? –

+0

私の前提は、あなたのxsltが間違っているか、あるいは提供されたxmlが、あなたがテストしたxmlと微妙に異なっているということです。両方のサンプルを見る必要があります。 –

+0

同じmaschineでvs2010とインストールの結果が異なるのですか? – blindmeis

答えて

0

現在のディレクトリは2つのケースで異なると思います。 XSLTファイルパスが相対URIとして指定されているため、後者の場合はXSLTファイルが見つかりません。

通常、現在のディレクトリはメイン実行可能ファイルが存在する場所ですが、Windowsサービスの場合はC:\Windows\System32です。現在のアプリケーションのパス決定する

一つの方法:

string path = System.IO.Path.GetDirectoryName( 
     System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); 
関連する問題