Avatar billede nzc Nybegynder
27. september 2005 - 12:36 Der er 9 kommentarer

konvertering fra xml til html vha xslt

Hej!

Jeg har følgende kode:


// Imported JAXP Transformer (TraX) classes
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerConfigurationException;

// Imported java classes
import java.io.StringReader;
import java.io.FileReader;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.Serializable;


/*
*  Use the TraX interface to perform a transformation in the simplest manner possible
*  (3 statements).
*/
public class MainClass implements Serializable
{

    private static final long serialVersionUID = 1L;
String        sXML;
  String        sXSLTemplate;

  public String getXML() { return sXML; }
  synchronized  public void  setXML(String sXMLData) {
    sXML = sXMLData;
  }

  public String getXSLTemplate() { return sXSLTemplate; }
  synchronized  public void  setXSLTemplate(String sXSLFile) {
    sXSLTemplate = sXSLFile;
  }

  // Make sure the buildReport method is thread-safe.
  synchronized  public void  buildReport(String sXMLData, String sXSLFile)
        throws  TransformerException, TransformerConfigurationException,
                FileNotFoundException, IOException
  {
    // Create an output file with the same name as the XSL template file,
    // but with an extension of ".html".
    String sOutFile;
    int iDot = sXSLFile.lastIndexOf(".");
    if ( iDot != -1 ) {
        sOutFile = sXSLFile.substring(0, iDot) + ".html";
    } else {
        sOutFile = sXSLFile + ".html";
    }
    // Initialize the Bean properties.
    sXML = sXMLData;
    sXSLTemplate = sXSLFile;

    // Use the static TransformerFactory.newInstance() method to instantiate
    // a TransformerFactory. The javax.xml.transform.TransformerFactory
    // system property setting determines the actual class to instantiate --
    // org.apache.xalan.transformer.TransformerImpl.
    TransformerFactory tFactory = TransformerFactory.newInstance();
   
    // Use the TransformerFactory to instantiate a transformer that will work with 
    // the style sheet you specify. This method call also processes the style sheet
    // into a compiled Templates object.
    Transformer transformer = tFactory.newTransformer(new StreamSource(sXSLTemplate));

    // Use the transformer to apply the associated templates object to an XML document
    // and write the output to a file with the same name as the XSL template file that
    // was passed in sXSLFile.
    String out;
    transformer.transform(new StreamSource(new StringReader(sXML)),
                          new StreamResult(new FileOutputStream(sOutFile)));


  }
  // Make sure the buildReport method is thread-safe.
  synchronized  public void  buildReport()
        throws  TransformerException, TransformerConfigurationException,
                FileNotFoundException, IOException
  {
    // Create an output file with the same name as the XSL template file,
    // but with an extension of ".html".
    String sOutFile;
    int iDot = sXSLTemplate.lastIndexOf(".");
    if ( iDot != -1 ) {
        sOutFile = sXSLTemplate.substring(0, iDot) + ".html";
    } else {
        sOutFile = sXSLTemplate + ".html";
    }
    // Use the same three lines to transform the XML string to HTML.
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(sXSLTemplate));
    transformer.transform(new StreamSource(new StringReader(sXML)),
                          new StreamResult(new FileOutputStream(sOutFile)));


  }
  // constructor
  public MainClass() {}


}

--------------

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;

import org.w3c.dom.Document;
import org.xml.sax.SAXException;

public class start {

    /**
    * @param args
    */
    public static void main(String args[])
    {
      MainClass      rgObject;
      String sXML;
      String sXSLFile;
      Document doc = parseFile("C:\\a\\PIElarge.xml");
      sXML = doc.toString();
      sXSLFile = "C:\\a\\html.xsl";

   
        rgObject = new MainClass();
        // This method transforms the XML to HTML and pops up the default browser.
        try {
            rgObject.buildReport(sXML, sXSLFile);
        } catch (TransformerConfigurationException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (TransformerException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }


    }

      public static Document parseFile(String fileName) {
            System.out.println("Parsing XML file... " + fileName);
            DocumentBuilder docBuilder;
            Document doc = null;
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setIgnoringElementContentWhitespace(true);
            try {
                docBuilder = docBuilderFactory.newDocumentBuilder();
            }
            catch (ParserConfigurationException e) {
                System.out.println("Wrong parser configuration: " + e.getMessage());
                return null;
            }
            File sourceFile = new File(fileName);
            try {
                doc = docBuilder.parse(sourceFile);
            }           
            catch (SAXException e) {
                System.out.println("Wrong XML file structure: " + e.getMessage());
                return null;
            }
            catch (IOException e) {
                System.out.println("Could not read source file: " + e.getMessage());
            }
            catch (Exception e) {
                System.out.println("ERROR: " + e.getMessage());
                return null;
            }
            System.out.println("XML file parsed");
            return doc;
        }
}


Og jeg får følgende fejl:

Parsing XML file... C:\a\PIElarge.xml
XML file parsed
ERROR:  'Content is not allowed in prolog.'
ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.'
javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at MainClass.buildReport(MainClass.java:73)
    at start.main(start.java:32)
Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
    ... 4 more
Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    ... 5 more
---------
javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at MainClass.buildReport(MainClass.java:73)
    at start.main(start.java:32)
Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    ... 5 more
---------
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at MainClass.buildReport(MainClass.java:73)
    at start.main(start.java:32)
---------
org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at MainClass.buildReport(MainClass.java:73)
    at start.main(start.java:32)
---------
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Content is not allowed in prolog.
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at MainClass.buildReport(MainClass.java:73)
    at start.main(start.java:32)
---------
org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
    at MainClass.buildReport(MainClass.java:73)
    at start.main(start.java:32)

Nogen der har en go ide?!
Avatar billede arne_v Ekspert
27. september 2005 - 12:57 #1
"Content is not allowed in prolog"

antyder jo at det er interessant at se toppen af XML og XSL
Avatar billede nzc Nybegynder
27. september 2005 - 13:17 #2
jam den får du bare :)

<?xml version="1.0" encoding="UTF-8"?>

<!--  ...................................................  -->
<!-- fc07.xml                                              -->
<!-- 18.01.05 (FC) Version 0.7                            -->
<!-- (c)2005 EDImatic A/S                                  -->
<!--                                                      -->
<!-- Html konvertering af OIO faktura                      -->
<!--                (PIE,PCM,PIP,PCP samt testvarianter)  -->
<!--                                                      -->
<!-- Noter:                                                -->
<!--  1. Visning af TIFF                                  -->
<!--  2. Baggrundsfarver?                                -->
<!--  3. De rigtige betalingsoplysninger skal fiskes      -->
<!--  5. Liniespecificeret                                -->
<!--  6. Linieskift ved fritekst skal bevares            -->
<!--  ...................................................  -->
<!-- Bryan Rasmussen changed structure of stylesheet, seperated out into templates, use css for styling, added meta tags to output -->

<xsl:stylesheet version="1.0"
    xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"
    xmlns:udk= "http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/"
    xmlns:com= "http://rep.oio.dk/ubl/xml/schemas/0p71/common/"
    xmlns:pie= "http://rep.oio.dk/ubl/xml/schemas/0p71/pie/"
    xmlns:tpcm="http://rep.oio.dk/ubl/xml/schemas/0p71/testpcm/"
    xmlns:tpcp="http://rep.oio.dk/ubl/xml/schemas/0p71/testpcp/"
    xmlns:tpie="http://rep.oio.dk/ubl/xml/schemas/0p71/testpie/"
    xmlns:tpip="http://rep.oio.dk/ubl/xml/schemas/0p71/testpip/"
    xmlns:pip= "http://rep.oio.dk/ubl/xml/schemas/0p71/pip/"
    xmlns:pcm= "http://rep.oio.dk/ubl/xml/schemas/0p71/pcm/"
    xmlns:pcp= "http://rep.oio.dk/ubl/xml/schemas/0p71/pcp/">

<xsl:output method="xml" indent="yes"/>
  <xsl:variable name="fakturatype">
          <xsl:choose>
            <xsl:when test="contains(/pie:Invoice/com:TypeCode, 'PIE')">FAKTURA</xsl:when>
            <xsl:when test="contains(/pip:Invoice/com:TypeCode, 'PIP')">FAKTURA</xsl:when>
            <xsl:when test="contains(/pcm:Invoice/com:TypeCode, 'PCM')">KREDITNOTA</xsl:when>
            <xsl:when test="contains(/pcp:Invoice/com:TypeCode, 'PCP')">KREDITNOTA</xsl:when>
            <xsl:otherwise>Ukendt dokumenttype</xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
<xsl:template match="/">
        <xsl:apply-templates select="/*[local-name()='Invoice']"/>
</xsl:template>

<xsl:template match="udk:Invoice| pip:Invoice | pie:Invoice | pcm:Invoice |tpcm:Invoice |tpcp:Invoice|tpie:Invoice|tpip:Invoice | pcp:Invoice ">

     


    <!-- opretter HTML med max 4 tabeller -->
    <html>
        <head>
            <title>OIOXML fakturaudskrivning version 0.7 (<xsl:value-of select="com:TypeCode"/>)</title>                    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="Stylesheet" type="text/css" href="ubl.css">  </link><link rel="Stylesheet" type="text/css" href="finance.css">  </link>   

        </head>
        <body>
            <!-- Start på fakturahovedet -->
<xsl:call-template name="fakturatop"/>
           
               

           
<!--put div around invoicetable betalingsoplysninger, get away from using hr tag-->
<div class="invoicemain">
           
<xsl:call-template name="invoicetable"/>
<xsl:call-template name="betalingsoplysninger"/>
</div>

            <br/>
            <!-- Slut på betalingsoplysninger -->

            <!-- Start på fritekst -->
                    <xsl:if test="com:Note[.!='']">
            <table border="0" width="100%" cellspacing="0" cellpadding="2">
                <tr>
                    <td valign="top"></td>
                    <td valign="top"></td>
                    <td valign="top"></td>
                    <td valign="top"></td>
                </tr>
                <tr>
                    <td valign="top" colspan="4" >
                        <!-- her indsættes fritekst -->
                                        <b>Yderligere oplysninger:</b><br/>
                                                <xsl:value-of select="com:Note"/><br/>
                    </td>
                </tr>
            </table>
                    </xsl:if>
            <!-- Slut på fritekst -->

        </body>
    </html>
</xsl:template>


<xsl:template match="com:InvoiceLine">
    <!-- indsætter 3 koloner for hver fakturalinie,en med materiale og pris oplysninger, en med supl. oplysninger og en med luft -->
    <tr>
        <td width="17%" valign="top">
           
                <!-- indsætter EAN varenr -->
                <xsl:value-of select="com:Item/com:ID"/>
           
        </td>
        <td width="50%" valign="top">
           
            <!-- indsætter varebeskrivelse -->
            <xsl:value-of select="com:Item/com:Description"/>
           
        </td>
        <td width="10%" valign="top">
           
            <!-- indsætter antal -->
            <xsl:variable name="antal" select="com:InvoicedQuantity"/>
            <xsl:value-of select="format-number($antal, '##0.00')"/>
                     
        </td>
        <td width="10%" valign="top">
                     
            <!-- indsætter enhed -->
            <xsl:value-of select="com:InvoicedQuantity/@unitCode"/>
                     
        </td>
        <td width="5%" valign="top">
                     
            <!-- indsætter enhedspris -->
            <xsl:variable name="enhedspris" select="com:BasePrice/com:PriceAmount"/>
            <xsl:value-of select="format-number($enhedspris, '##0.00')"/>
                     
        </td>
        <td width="3%" valign="top">
                       
            <!-- indsætter tom felt -->
                   
        </td>
        <td width="13%"  align="right">
                       
            <!-- indsætter linietotal -->
            <xsl:variable name="linietotal" select="com:LineExtensionAmount"/>
            <xsl:value-of select="format-number($linietotal, '##0.00')"/>
                   
        </td>
    </tr>
    <tr>
        <td ><font face="Arial" size="2"></font></td>
        <td colspan="1" ><span class="varenr">
            <!-- indsætter flere ordreoplysniger -->
                    <xsl:if test="com:Item/com:SellersItemIdentification/ID[.!='']">
                      <b>Leverandørens varenr.: </b> <xsl:value-of select="com:Item/com:SellersItemIdentification/ID"/>
                    </xsl:if>
                    <xsl:if test="com:Item/com:CommodityClassification/com:CommodityCode[.!='']">
                      <b>UNSPSC code.: </b> <xsl:value-of select="com:Item/com:CommodityClassification/com:CommodityCode"/>
                    </xsl:if>
                    <xsl:if test="com:Note[.!='']">
                      <b>Note.: </b> <xsl:value-of select="com:Note"/>
                    </xsl:if></span>
                </td>
        <td > </td>
        <td > </td>
        <td > </td>
    </tr>
    <tr>
        <td colspan="7"  height="8">
        </td>
    </tr>
</xsl:template>

<xsl:template match="com:AllowanceCharge[parent::*[local-name()='Invoice']]">
                <tr>
                    <td  colspan="6"> <span class="important" id="Invoice_AllowanceCharge_ID"><b><xsl:value-of select="com:ID"/></b></span></td>
                    <td  align="right">
                                                <span class="important" id="Invoice_AllowanceCharge_AllowanceChargeAmount">
                           
                              <xsl:value-of select="format-number(com:AllowanceChargeAmount, '##0.00')"/>
                                                </span>
                    </td>
                </tr>
                               
</xsl:template>


<xsl:template match="com:SellerParty">
<div class="sellerparty">
<b class="partyinfo">Leverandør</b>
  <xsl:call-template name="partycontent"/>
  CVR.: <xsl:value-of select="com:PartyTaxScheme/com:CompanyTaxID"/>
    <br/>
                            <b>Kontaktoplysninger</b>
                                                <xsl:value-of select="com:OrderContact/com:Name"/><br/>
                                                Tlf.: <xsl:value-of select="com:OrderContact/com:Phone"/><br/>
                                                Email.: <xsl:value-of select="com:OrderContact/com:E-Mail"/><br/>

</div>
</xsl:template>
<xsl:template match="com:BuyerParty">

                                             
                                                <xsl:choose>
                                                <xsl:when test = "com:Address/com:ID = 'Juridisk'">
<div class="buyerparty" id="juridiskbuyerparty" >
<b class="partyinfo">Juridisk</b><br/>
<xsl:call-template name="partycontent"/>


</div>
                                                </xsl:when>
<xsl:otherwise><div class="buyerparty" id="faktureringbuyerparty">
<b>Fakturering</b><br/>
<xsl:call-template name="partycontent"/></div>
</xsl:otherwise>
</xsl:choose>
                                             
</xsl:template>

<xsl:template name="partycontent">
<xsl:apply-templates select="com:PartyName"/>
<xsl:apply-templates select="com:Address/com:Street | com:Address/com:HouseNumber | com:Address/com:CityName | com:Address/com:PostalZone"/>



</xsl:template>

<xsl:template match="com:Address/com:HouseNumber|  com:Address/com:CityName | com:PartyName"><xsl:value-of select="."/><br/></xsl:template>

<xsl:template match="com:Address/com:Street | com:Address/com:PostalZone">
<xsl:value-of select="."/> <xsl:text> </xsl:text>
</xsl:template>

<xsl:template name="fakturatop">
<div class="fakturahovedet">
<span class="logo"><img src="logo.gif" ALIGN="RIGHT"></img></span><span><h5><xsl:value-of select="$fakturatype"/></h5></span>
<div class="invoiceinfo">
<b>Køber</b><br/>
                                                EAN: <xsl:value-of select="com:BuyersReferenceID"/><br/>
                                                Ordrekontakt.: <xsl:value-of select="com:BuyerParty/com:BuyerContact/com:Name"/><br/>
<span> <b>Fakturanr: </b> <xsl:value-of select="com:ID"/></span>
<span><b>Købers ordrenr: </b><xsl:value-of select="com:ReferencedOrder/com:BuyersOrderID"/></span>
<span><b>Sælgers ordrenr: </b><xsl:value-of select="com:ReferencedOrder/com:SellersOrderID"/></span>
<span><b>Dato: </b><xsl:value-of select="com:IssueDate"/></span>
<span><b>DimensionsKonto:</b> <xsl:value-of select="com:BuyerParty/com:AccountCode"/></span>

</div>
<xsl:apply-templates select="com:BuyerParty"/>
<xsl:apply-templates select="com:SellerParty"/>
</div>
</xsl:template>
<xsl:template name="invoicetable">

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
                <tr>
                    <td >Varenr</td>
                    <td >Beskrivelse</td>
                    <td >Antal</td>
                    <td >Enhed</td>
                    <td >Enhedspris</td>
                    <td > &#160;</td>
                    <td  align="right">
                        Pris<br/>
                    </td>
                </tr>
               
                <!-- indsætter Ordreliner -->
                <xsl:apply-templates select="com:InvoiceLine"/>
               
            <tr>
                    <td width="100%"  colspan="7"  height="1"><hr class="seperator" id="ilinesep"/></td>
                </tr>

                <tr>
                    <td  colspan="6">Pris i alt excl moms</td>
                    <td  align="right">
           
              <xsl:value-of select="format-number(com:LegalTotals/com:LineExtensionTotalAmount, '##0.00')"/>
                                               
                    </td>
                </tr>
                      <xsl:apply-templates select="com:AllowanceCharge"/>
                <tr>
                                 
                    <td  colspan="6"><b>Total momsbeløb (<xsl:value-of select="format-number(com:TaxTotal/com:CategoryTotal/com:RatePercentNumeric, '##0.00')"/>%)</b></td>
                    <td  align="right">
                                             
                       
                                    <xsl:value-of select="format-number(com:TaxTotal/com:TaxAmounts/com:TaxAmount, '##0.00')"/>
                                             
                    </td>
                </tr>
                <tr>
                    <td  colspan="6">Total incl moms</td>
                    <td  align="right">
                                           
                       
                              <xsl:value-of select="format-number(com:LegalTotals/com:ToBePaidTotalAmount, '##0.00')"/>
                                             
                    </td>
                </tr>
                <tr>   
                                        <td width="100%"  colspan="7"  height="2"><hr class="seperator"/></td>
                </tr>

            </table>

</xsl:template>

<xsl:template name="betalingsoplysninger">

<xsl:variable name="typecodeid" select="com:PaymentMeans/com:TypeCodeID"/>
            <table border="0" width="100%" cellspacing="0" cellpadding="2">
                <tr>
                    <td > </td>
                    <td > </td>
                    <td > </td>
                    <td > </td>
                </tr>
                <tr>
                    <td  colspan="4" >
                        <!-- her indsættes betalingsoplysninger -->
                                        <b>Betalingsoplysninger</b><br/>
                                                <xsl:choose>
                                               
                                                <xsl:when test = "com:PaymentMeans/com:PaymentChannelCode = 'KONTOOVERFØRSEL'">

                                                Forfaldsdato: <xsl:value-of select="com:PaymentMeans/com:PaymentDueDate"/><br/>
                                                Valutakode: <xsl:value-of select="udk:InvoiceCurrencyCode"/><br/>
                                                Betalingstype: <xsl:value-of select="com:PaymentMeans/com:PaymentChannelCode"/><br/>
                                                Kontotype.: <xsl:value-of select="com:PaymentMeans/com:PayeeFinancialAccount/com:TypeCode"/><br/>
                                                Regnr: <xsl:value-of select="com:PaymentMeans/com:PayeeFinancialAccount/com:FiBranch/com:ID"/><br/>
                                                Kontonr.: <xsl:value-of select="com:PaymentMeans/com:PayeeFinancialAccount/com:ID"/><br/>
                                                Pengeinstitut: <xsl:value-of select="com:PaymentMeans/com:PayeeFinancialAccount/com:FiBranch/com:FinancialInstitution/com:Name"/><br/>

                                                </xsl:when>

                                                                                            <xsl:when test = "com:PaymentMeans/com:PaymentChannelCode = 'INDBETALINGSKORT'">

<xsl:variable name="kreditornr">
<xsl:choose><xsl:when test="$typecodeid='01'"><xsl:value-of select="com:PaymentMeans/com:PayeeFinancialAccount/com:ID"/></xsl:when><xsl:otherwise><xsl:value-of select="com:PaymentMeans/com:JointPaymentID"/></xsl:otherwise></xsl:choose>
</xsl:variable>
                                                Forfaldsdato: <xsl:value-of select="com:PaymentMeans/com:PaymentDueDate"/><br/>
                                                Valutakode: <xsl:value-of select="udk:InvoiceCurrencyCode"/><br/>
                                                Betalingstype: <xsl:value-of select="com:PaymentMeans/com:PaymentChannelCode"/><br/>
                                                Kortart: <xsl:value-of select="com:PaymentMeans/com:TypeCodeID"/><br/>
                                                Betalingsid: <xsl:value-of select="com:PaymentMeans/com:PaymentID"/><br/>
                                                Kreditornr: <xsl:value-of select="$kreditornr"/><br/>

                                                </xsl:when>

                                                <xsl:when test = "com:PaymentMeans/com:PaymentChannelCode = 'DIRECT DEBET'">
                                                Forfaldsdato: <xsl:value-of select="com:PaymentMeans/com:PaymentDueDate"/><br/>
                                                Valutakode: <xsl:value-of select="udk:InvoiceCurrencyCode"/><br/>
                                                Betalingstype: <xsl:value-of select="com:PaymentMeans/com:PaymentChannelCode"/><br/>

                                                </xsl:when>

                                               
                                                <xsl:when test = "com:PaymentMeans/com:PaymentChannelCode = 'NATIONAL CLEARING'">
                                                Forfaldsdato: <xsl:value-of select="com:PaymentMeans/com:PaymentDueDate"/><br/>
                                                Valutakode: <xsl:value-of select="udk:InvoiceCurrencyCode"/><br/>
                                                Betalingstype: <xsl:value-of select="com:PaymentMeans/com:PaymentChannelCode"/><br/>

                                                </xsl:when>

                                                <!-- Ukendt betalingstype -->
                                                <xsl:otherwise>
                                                Forfaldsdato: <xsl:value-of select="com:PaymentMeans/com:PaymentDueDate"/><br/>
                                                Valutakode: <xsl:value-of select="udk:InvoiceCurrencyCode"/><br/>
                                                Betalingstype: <xsl:value-of select="com:PaymentMeans/com:PaymentChannelCode"/><br/>
                                                </xsl:otherwise>
                                                </xsl:choose>

                                               
                                               
                    </td>
                </tr>
            </table>
</xsl:template>
</xsl:stylesheet>


------

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

<Invoice xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ pie2/piestrict.xsd"  xmlns:h="http://www.w3.org/1999/xhtml">
    <com:ID>200500001</com:ID>
    <com:IssueDate>2005-01-01</com:IssueDate>
    <com:TypeCode>PIE</com:TypeCode><main:InvoiceCurrencyCode>DKK</main:InvoiceCurrencyCode>
   
    <com:Note>I forbindelse med status yder vi 10% rabat i uge 42 på alle ordrer.</com:Note>
    <main:EncodedDocument agencyID="Farum">ZnNhZ2dmYWRmaGhhZGZhZGZo</main:EncodedDocument>
    <com:BuyersReferenceID schemeID="EAN">5290987654321</com:BuyersReferenceID>
    <com:ReferencedOrder>
        <com:BuyersOrderID>M-147-B</com:BuyersOrderID>
        <com:SellersOrderID>765476</com:SellersOrderID>
        <com:IssueDate>2003-07-02</com:IssueDate>
    </com:ReferencedOrder>
    <com:BuyerParty>
        <com:ID schemeID="CVR">26769388</com:ID>
        <com:AccountCode>45654455</com:AccountCode>
        <com:PartyName>
            <com:Name>IT- og Telestyrelsen</com:Name>
        </com:PartyName>
        <com:Address>
            <com:ID>Faktura</com:ID>
            <com:Street>Holsteinsgade</com:Street>
            <com:HouseNumber>63</com:HouseNumber>
            <com:CityName>København Ø</com:CityName>
            <com:PostalZone>1260</com:PostalZone>
            <com:Country>
                <com:Code listID="ISO 3166-1">DK</com:Code>
            </com:Country>
        </com:Address>
        <com:BuyerContact>
            <com:ID>hj@itst.dk</com:ID>
            <com:Name>Hans Jensen</com:Name>
            <com:Phone>33456545</com:Phone>
            <com:Fax>33456550</com:Fax>
            <com:E-Mail>hj@itst.dk</com:E-Mail>
            <com:Role>Rekvirent</com:Role>
        </com:BuyerContact>
        <com:ExtensibleContent>
            <h:p>Her er tilføjet xhtml opmærkning. Når ExtensibleContent elementet benyttes skal det indeholde mindst et element udenfor com namespacet.</h:p>
        </com:ExtensibleContent>
    </com:BuyerParty>
    <com:BuyerParty>
        <com:ID schemeID="CVR">26769388</com:ID>
        <com:AccountCode>45654455</com:AccountCode>
        <com:PartyName>
            <com:Name>IT- og Telestyrelsen</com:Name>
        </com:PartyName>
        <com:Address>
            <com:ID>Juridisk</com:ID>
            <com:Street>Bredgade</com:Street>
            <com:HouseNumber>40</com:HouseNumber>
            <com:CityName>København K</com:CityName>
            <com:PostalZone>1260</com:PostalZone>
            <com:Country>
                <com:Code listID="ISO 3166-1">DK</com:Code>
            </com:Country>
        </com:Address>
        <com:BuyerContact>
            <com:ID>hj@itst.dk</com:ID>
            <com:Name>Hans Jensen</com:Name>
            <com:Phone>33456545</com:Phone>
            <com:Fax>33456550</com:Fax>
            <com:E-Mail>hj@itst.dk</com:E-Mail>
            <com:Role>Rekvirent</com:Role>
        </com:BuyerContact>
        <com:ExtensibleContent>
            <h:p>Her er tilføjet xhtml opmærkning. Når ExtensibleContent elementet benyttes skal det indeholde mindst et element udenfor com namespacet.</h:p>
        </com:ExtensibleContent>
    </com:BuyerParty>
    <com:DestinationParty>
        <com:ID schemeID="CVR">56668519</com:ID>
        <com:AccountCode>889876</com:AccountCode>
        <com:PartyName>
            <com:Name>ITST</com:Name>
        </com:PartyName>
        <com:Contact>
            <com:ID>hj@itst.dk</com:ID>
            <com:Name>Hans Jensen</com:Name>
            <com:Phone>33456545</com:Phone>
            <com:Fax>33456550</com:Fax>
            <com:E-Mail>hj@itst.dk</com:E-Mail>
        </com:Contact>
        <com:Language>
            <com:ID>da</com:ID>
        </com:Language>
        <com:Address>
            <com:ID>454333</com:ID>
            <com:Street>Bredgade</com:Street>
            <com:AdditionalStreet/>
            <com:HouseNumber>40</com:HouseNumber>
            <com:InhouseMail>3. sal</com:InhouseMail>
            <com:CityName>København K</com:CityName>
            <com:PostalZone>1260</com:PostalZone>
            <com:Country>
                <com:Code>DK</com:Code>
            </com:Country>
        </com:Address>
    </com:DestinationParty>
    <com:SellerParty>
        <com:ID schemeID="CVR">26666668</com:ID>
        <com:BuyersID>123456</com:BuyersID>
        <com:PartyName>
            <com:Name>PJ Unconstruction A/S</com:Name>
        </com:PartyName>
        <com:Address>
            <com:ID>Vareafsendelse</com:ID>
            <com:Street>Jernbanegade</com:Street>
            <com:HouseNumber>875</com:HouseNumber>
            <com:CityName>Roskilde</com:CityName>
            <com:PostalZone>4000</com:PostalZone>
            <com:Country>
                <com:Code listID="ISO 3166-2">DK-025</com:Code>
            </com:Country>
        </com:Address>
        <com:PartyTaxScheme>
            <com:CompanyTaxID schemeID="CVR">56668519</com:CompanyTaxID>   
    </com:PartyTaxScheme>
        <com:OrderContact>
            <com:ID>ppt@pj-unconstruction.dk</com:ID>
            <com:Name>Peter Petersen</com:Name>
            <com:Phone>34546787</com:Phone>
            <com:Fax>23456566</com:Fax>
            <com:E-Mail>ppt@pj-unconstruction.dk</com:E-Mail>
        </com:OrderContact>
        <com:ExtensibleContent>
            <h:p>Her er tilføjet xhtml opmærkning. Når ExtensibleContent elementet benyttes skal det indeholde mindst et element udenfor com namespacet.</h:p>
        </com:ExtensibleContent>
    </com:SellerParty>
    <com:PaymentMeans>
        <com:TypeCodeID>71</com:TypeCodeID>
        <com:PaymentDueDate>2004-09-01</com:PaymentDueDate>
        <com:PaymentChannelCode>INDBETALINGSKORT</com:PaymentChannelCode>
        <com:PaymentID>554321234543445</com:PaymentID>
        <com:PayeeFinancialAccount>
            <com:ID>65366333</com:ID>
            <com:TypeCode>FIK</com:TypeCode>
            <com:FiBranch>
                <com:ID>6666</com:ID>
                <com:FinancialInstitution>
                    <com:ID>DABADKKK</com:ID>
                    <com:Name>Andelsbanken</com:Name>
                </com:FinancialInstitution>
            </com:FiBranch>
        </com:PayeeFinancialAccount>
        <com:PaymentAdvice>
            <com:LongAdvice><![CDATA[Lang advisering for kortart 75
            Linjeskift bevares vha. CDATA]]></com:LongAdvice>
            <com:AccountToAccount>
                <com:PayerNote>Oplysning til modtager</com:PayerNote>
                <com:PayeeNote>Oplysning til egen konto</com:PayeeNote>
            </com:AccountToAccount>
        </com:PaymentAdvice>
        <com:ExtensibleContent>
            <h:p>Her er tilføjet xhtml opmærkning. Når ExtensibleContent elementet benyttes skal det indeholde mindst et element udenfor com namespacet.</h:p>
        </com:ExtensibleContent>
    </com:PaymentMeans>
    <com:PaymentTerms>
        <com:ID>CONTRACT</com:ID>
        <com:RateAmount currencyID="DKK">743.33</com:RateAmount>
        <com:SettlementDiscountRateNumeric>4</com:SettlementDiscountRateNumeric>
        <com:PenaltySurchargeRateNumeric>4</com:PenaltySurchargeRateNumeric>
        <com:SettlementPeriod>
            <com:EndDateTimeDate>2003-07-02</com:EndDateTimeDate>
        </com:SettlementPeriod>
        <com:PenaltyPeriod>
            <com:StartDateTime>2003-07-02T12:13:14+01:00</com:StartDateTime>
        </com:PenaltyPeriod>
    </com:PaymentTerms>
    <com:AllowanceCharge>
        <com:ID>Afgift</com:ID>
        <com:ChargeIndicator>true</com:ChargeIndicator>
        <com:MultiplierReasonCode>343</com:MultiplierReasonCode>
        <com:MultiplierFactorQuantity unitCode="stk" unitCodeListAgencyID="n/a">40</com:MultiplierFactorQuantity>
        <com:AllowanceChargeAmount currencyID="DKK">400.00</com:AllowanceChargeAmount>
        <com:BuyersReferenceID>7110-4545333544</com:BuyersReferenceID>
    </com:AllowanceCharge>
    <com:AllowanceCharge>
        <com:ID>Gebyr</com:ID>
        <com:ChargeIndicator>true</com:ChargeIndicator>
        <com:MultiplierReasonCode>343</com:MultiplierReasonCode>
        <com:MultiplierFactorQuantity unitCode="stk" unitCodeListAgencyID="n/a">40</com:MultiplierFactorQuantity>
        <com:AllowanceChargeAmount currencyID="DKK">400</com:AllowanceChargeAmount>
    </com:AllowanceCharge>
    <com:TaxTotal>
        <com:TaxTypeCode>VAT</com:TaxTypeCode>
        <com:TaxAmounts>
            <com:TaxableAmount currencyID="DKK">400.00</com:TaxableAmount>
            <com:TaxAmount currencyID="DKK">100.00</com:TaxAmount>
        </com:TaxAmounts>
        <com:CategoryTotal>
            <com:RateCategoryCodeID>VAT</com:RateCategoryCodeID>
            <com:RatePercentNumeric>25</com:RatePercentNumeric>
            <com:TaxAmounts>
                <com:TaxableAmount currencyID="DKK">1000.00</com:TaxableAmount>
                <com:TaxAmount currencyID="DKK">250.00</com:TaxAmount>
            </com:TaxAmounts>
        </com:CategoryTotal>
    </com:TaxTotal>
    <com:LegalTotals>
        <com:LineExtensionTotalAmount currencyID="DKK">24000</com:LineExtensionTotalAmount>
        <com:ToBePaidTotalAmount currencyID="DKK">30000</com:ToBePaidTotalAmount>
    </com:LegalTotals>
    <com:InvoiceLine>
        <com:ID>45</com:ID>
        <com:InvoicedQuantity unitCode="Stk" unitCodeListAgencyID="n/a">1000</com:InvoicedQuantity>
        <com:LineExtensionAmount currencyID="DKK">560.00</com:LineExtensionAmount>
        <com:Note>RØD</com:Note>
        <com:ReferencedOrderLine>
            <com:BuyersID>656544!</com:BuyersID>
            <com:SellersID>4223222</com:SellersID>
            <com:DestinationParty>
                <com:ID schemeID="CVR">56668519</com:ID>
                <com:AccountCode>889876</com:AccountCode>
                <com:PartyName>
                    <com:Name>ITST</com:Name>
                </com:PartyName>
                <com:Contact>
                    <com:ID>hj@itst.dk</com:ID>
                    <com:Name>Hans Jensen</com:Name>
                    <com:Phone>33456545</com:Phone>
                    <com:Fax>33456550</com:Fax>
                    <com:E-Mail>hj@itst.dk</com:E-Mail>
                </com:Contact>
                <com:Language>
                    <com:ID>da</com:ID>
                </com:Language>
                <com:Address>
                    <com:ID>454333</com:ID>
                    <com:Street>Bredgade</com:Street>
                    <com:AdditionalStreet/>
                    <com:HouseNumber>40</com:HouseNumber>
                    <com:InhouseMail>3. sal</com:InhouseMail>
                    <com:CityName>København K</com:CityName>
                    <com:PostalZone>1260</com:PostalZone>
                    <com:Country>
                        <com:Code>DK</com:Code>
                    </com:Country>
                </com:Address>
            </com:DestinationParty>
            <com:Item>
                <com:ID>434333</com:ID>
                <com:Description>Blyanter - kasse m. 10 stk</com:Description>
                <com:BuyersItemIdentification>
                    <com:ID schemeID="n/a">6565454</com:ID>
                    <com:Description>Rød</com:Description>
                </com:BuyersItemIdentification>
                <com:SellersItemIdentification>
                    <com:ID schemeID="n/a">454543</com:ID>
                    <com:Description>Blå</com:Description>
                </com:SellersItemIdentification>
                <com:ManufacturersItemIdentification>
                    <com:ID schemeID="EAN-13">5712345780121</com:ID>
                    <com:Description>Gul</com:Description>
                </com:ManufacturersItemIdentification>
                <com:StandardItemIdentification>
                    <com:ID schemeID="EAN-13">5712345780121</com:ID>
                    <com:Description>Sort</com:Description>
                </com:StandardItemIdentification>
                <com:CatalogueItemIdentification>
                    <com:ID schemeID="n/a">12123</com:ID>
                    <com:Description>Lilla</com:Description>
                </com:CatalogueItemIdentification>
                <com:ReferencedCatalogue>
                    <com:CatalogueID>POSTORDRE</com:CatalogueID>
                </com:ReferencedCatalogue>
                <com:CommodityClassification>
                    <com:CommodityCode listID="UNSPSC" listVersionID="7.3">4320150114</com:CommodityCode>
                </com:CommodityClassification>
                <com:Tax>
                    <com:RateCategoryCodeID>VAT</com:RateCategoryCodeID>
                    <com:TypeCode>VAT</com:TypeCode>
                    <com:RatePercentNumeric>25</com:RatePercentNumeric>
                </com:Tax>
                <com:BasePrice>
                    <com:PriceAmount currencyID="DKK">100</com:PriceAmount>
                    <com:BaseQuantity unitCode="stk" unitCodeListAgencyID="n/a">5</com:BaseQuantity>
                </com:BasePrice>
            </com:Item>
            <com:DeliveryRequirement>
                <com:ID>Deliverydate</com:ID>
                <com:DeliverySchedule>
                    <com:ID>2</com:ID>
                    <com:RequestedDeliveryDateTime>2003-07-07T13:24:55+01:00</com:RequestedDeliveryDateTime>
                </com:DeliverySchedule>
            </com:DeliveryRequirement>
            <com:AllowanceCharge>
                <com:ID>Told</com:ID>
                <com:ChargeIndicator>true</com:ChargeIndicator>
                <com:MultiplierReasonCode>234</com:MultiplierReasonCode>
                <com:MultiplierFactorQuantity unitCode="promille" unitCodeListAgencyID="n/a">5</com:MultiplierFactorQuantity>
                <com:AllowanceChargeAmount currencyID="DKK">300</com:AllowanceChargeAmount>
                <com:BuyersReferenceID>4544-6655</com:BuyersReferenceID>
            </com:AllowanceCharge>
        </com:ReferencedOrderLine>
        <com:AllowanceCharge>
            <com:ID>Rabat</com:ID>
            <com:ChargeIndicator>true</com:ChargeIndicator>
            <com:MultiplierReasonCode>456</com:MultiplierReasonCode>
            <com:MultiplierFactorQuantity unitCode="promille" unitCodeListAgencyID="n/a">34</com:MultiplierFactorQuantity>
            <com:AllowanceChargeAmount currencyID="DKK">300</com:AllowanceChargeAmount>
            <com:BuyersReferenceID>4354-77666</com:BuyersReferenceID>
        </com:AllowanceCharge>
        <com:AllowanceCharge>
            <com:ID>Fragt</com:ID>
            <com:ChargeIndicator>true</com:ChargeIndicator>
            <com:MultiplierReasonCode>456</com:MultiplierReasonCode>
            <com:MultiplierFactorQuantity unitCode="promille" unitCodeListAgencyID="n/a">34</com:MultiplierFactorQuantity>
            <com:AllowanceChargeAmount currencyID="DKK">300</com:AllowanceChargeAmount>
        </com:AllowanceCharge>
        <com:Item>
            <com:ID schemeID="n/a">434333</com:ID>
            <com:Description>Blyanter - kasse m. 10 stk</com:Description>
            <com:BuyersItemIdentification>
                <com:ID schemeID="n/a">454422</com:ID>
                <com:Description>100 stk - blå</com:Description>
            </com:BuyersItemIdentification>
            <com:SellersItemIdentification>
                <com:ID schemeID="n/a">12211</com:ID>
                <com:Description>100 stk - lyseblå</com:Description>
            </com:SellersItemIdentification>
            <com:ManufacturersItemIdentification>
                <com:ID schemeID="n/a">88778</com:ID>
                <com:Description>10 x 10 stk, blå</com:Description>
            </com:ManufacturersItemIdentification>
            <com:StandardItemIdentification>
                <com:ID schemeID="n/a">44555</com:ID>
                <com:Description>100, blå</com:Description>
            </com:StandardItemIdentification>
            <com:CatalogueItemIdentification>
                <com:ID schemeID="n/a">7788-dk</com:ID>
                <com:Description>50+50, blå</com:Description>
            </com:CatalogueItemIdentification>
            <com:ReferencedCatalogue>
                <com:CatalogueID>POSTORDRE</com:CatalogueID>
            </com:ReferencedCatalogue>
            <com:CommodityClassification>
                <com:CommodityCode listID="UNSPSC" listVersionID="7.3">4320150114</com:CommodityCode>
            </com:CommodityClassification>
            <com:Tax>
                <com:RateCategoryCodeID>VAT</com:RateCategoryCodeID>
                <com:TypeCode>VAT</com:TypeCode>
                <com:RatePercentNumeric>25</com:RatePercentNumeric>
            </com:Tax>
            <com:BasePrice>
                <com:PriceAmount currencyID="DKK">100</com:PriceAmount>
                <com:BaseQuantity unitCode="stk" unitCodeListAgencyID="n/a">5</com:BaseQuantity>
            </com:BasePrice>
        </com:Item>
        <com:BasePrice>
            <com:PriceAmount currencyID="DKK">100</com:PriceAmount>
            <com:BaseQuantity unitCode="stk" unitCodeListAgencyID="n/a">5</com:BaseQuantity>
        </com:BasePrice>
        <com:ExtensibleContent>
            <h:p>Her er tilføjet xhtml opmærkning. Når ExtensibleContent elementet benyttes skal det indeholde mindst et element udenfor com namespacet.</h:p>
        </com:ExtensibleContent>
    </com:InvoiceLine>
    <com:ValidatedSignature>
        <com:SignatureID/>
        <com:ValidatorID/>
        <com:ValidationDateTime>2003-04-01T13:01:02</com:ValidationDateTime>
        <com:Signature/>
    </com:ValidatedSignature>
    <com:ExtensibleContent>
        <h:p>Her er tilføjet xhtml opmærkning. Når ExtensibleContent elementet benyttes skal det indeholde mindst et element udenfor com namespacet.</h:p>
    </com:ExtensibleContent>
</Invoice>
Avatar billede arne_v Ekspert
27. september 2005 - 13:22 #3
kunne du prøve at flytte kommentaren i toppen af XSL ned under start tag (stylesheet) ?
Avatar billede arne_v Ekspert
27. september 2005 - 13:23 #4
rent gæt - men fejlen antyder at der er noget galt i toppen
Avatar billede nzc Nybegynder
27. september 2005 - 13:34 #5
hjalp ikke :(

Jeg har i stedet fundet følgende kode til at transformerer med og den virker fint :)
http://java.oreilly.com/news/javaxslt_0801.html

Den gør dog stort set det samme
Avatar billede nzc Nybegynder
27. september 2005 - 13:34 #6
smid lige et svar arne_v
Avatar billede arne_v Ekspert
27. september 2005 - 13:47 #7
det kan jeg godt

men jeg synes nu ikke at jeg har hjulpet meget - og jeg forstår ikke at den fejl kunne
løses ved at ændre koden
Avatar billede nzc Nybegynder
27. september 2005 - 13:54 #8
det er du har kommet med kommentarer er jeg taknemmelig for og derfor skal du ha point :)
Avatar billede arne_v Ekspert
04. november 2005 - 20:03 #9
så skal du lige acceptere ...
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester