BillForm

softeyes Straße Plz Ort tel fax name@domain.de Kreditinstitut Bankleitzahl Konto-Nr xxx/xxx/xxxxx dexxxxxxxxx Dresden Ort Datum Kd-Nr. Rechnung Monatsgebühr 1 2.99 Datenverkehr 2 4.99

Source code:

<xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="request-business-card">
<!--

Beware: The mechanism to request a business card is really based on a
stupid idea.  Don't copy it.  It's just the reality as it accidentally
developed.  Normally, the business card should be an object, named by
the destination of the request.  The mechanism used here should only
be used, when the 'parent object' has to reveal some data.  In other
words, the way it's done here, the customer is asked to reveal some
billing address data.  The implementation as it should be would not
ask the customer.

-->
 <form>
  <template>business-card</template>
 </form>
</xsl:variable>
<xsl:variable xmlns:d="http://www.askemos.org/2000/NameSpaceDSSSL" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="rechnung" xml:space="default">
<!--

This software has been published in the hope it might be useful, even
though it's quick hack, not worth the publicity.  Be prepared for a
mixed language software: "rechnung" is the german word for bill,

We'll later use the first child of the 'bill' variable.  If there was
a bill in the request, it's used, otherwise the template is printed.

-->
 <d:copy-of select="(select-elements (current-node) &apos;rechnung)"></d:copy-of>
 <rechnung xml:space="default">
  <rechnungsnr></rechnungsnr>
  <von>
<!-- content type as in vCard rfc 2426 -->
   <adr>
    <affilation>softeyes</affilation>
    <street>Straße</street>
    <zip>Plz</zip>
    <city>Ort</city>
   </adr>
   <tel>tel</tel>
   <fax>fax</fax>
   <email>name@domain.de</email>
  </von>
  <bankverbindung>
   <name>Kreditinstitut</name>
   <blz>Bankleitzahl</blz>
   <ktonr>Konto-Nr</ktonr>
  </bankverbindung>
  <steuerkennung>
   <stnr>xxx/xxx/xxxxx</stnr>
   <ust-id>dexxxxxxxxx</ust-id>
  </steuerkennung>
  <an>
   <d:copy-of select="
 (fetch
   (let ((kunde (data (form-field &apos;kunde (current-node)))))
    (or (and (not (equal? kunde &quot;&quot;)) (string-&gt;oid kunde))
        (msg &apos;dc-creator)))
   body: (xsl-variable &quot;request-business-card&quot;))"></d:copy-of>
  </an>
  <ort>Dresden</ort>
  <datum>
   <d:copy-of select="
 (date-&gt;string (current-date (* 2 3600)) &quot;~e. ~B ~Y&quot; &quot;de&quot;)
"></d:copy-of>
  </datum>
  <bestellort>Ort</bestellort>
  <bestelldatum>Datum</bestelldatum>
  <unserzeichen>Kd-Nr.</unserzeichen>
  <ihrzeichen></ihrzeichen>
  <betreff>Rechnung</betreff>
  <posten>
   <text>Monatsgebühr</text>
   <menge>1</menge>
   <preis>2.99</preis>
  </posten>
  <posten>
   <text>Datenverkehr</text>
   <menge>2</menge>
   <preis>4.99</preis>
  </posten>
  <zahlungsziel>
   <d:copy-of select="
    (let ((d (current-date (* 2 3600)))) ;; fixme zime zone!
      (literal
         (date-&gt;string
          (make-date 0 0 0 0 1
                    (modulo (+ 1 (date-month d)) 12)
                    (+ (date-year d) (if (eqv? (date-month d) 12) 1 0))
                    (* 2 3600))
           &quot;~e. ~B ~Y&quot;
           &quot;de&quot;)))
    "></d:copy-of>
  </zahlungsziel>
 </rechnung>
</xsl:variable>

Diese Seite findet man von: overview, .


In Bearbeitung: Adc5dd0c30f6e63932811ed60e019bb2d.

Letzte Modifikation: Thu, 06 Mar 2003 14:27:21 +0100

Autor(en):

Dokument Nummer A67bb0753e1676f81983e0ecf3a15b391 geliefert an public um Sat, 19 May 2012 01:26:39 +0200