Re: Field records backend ?

Subject: Re: Field records backend ?
From: "Mitch C. Amiano" <amiamc@xxxxxxxxxxxxxxx>
Date: Tue, 11 Apr 2000 08:56:40 -0400
You could use the formattinginstruction extension in Jade to do this.

I imagine a solution in DSSSL could use a list to describe the 
output record in terms of the field sizes, call string-length
to figure out how much to pad field content to fit, and generate
an error message if the actual field content overflows.

<INPUTRECORD f1="Foo" f2="Bar" f3="Baz" />
(define (attval str #!optional (nl (current-node)) (dfltstring ""))
;; wrapper for "attribute-string" which returns an empty string instead of #f
   (let ((v (attribute-string str nl)))
      (if (string? v)  v dfltstring )
))

(define rec (list 3 4 5) )   ; field sizes
(element INPUTRECORD
   (let 
      ( (f2 (attribute-string
      )
      (
      )
   )
)

owner-dssslist@xxxxxxxxxxxxxxxx wrote:
> 
> Hi all.
> I am looking for a way to output records with fixed length fields from
> SGML/XML. I think that there are a lot of possibilities, such as
> outputting a very simple SGML and processing it with some script, but I
> wondered if someone had done this before and which tools could be used
> (Openjade + ???)
> 
> Any hints.
> 
> Jany.
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

--                                                                        --
Mitch C. Amiano                               Mitch.C.Amiano@xxxxxxxxxxxxxxx
SDE, ET&PE, Eng. Services, Raleigh Design Center, Alcatel USA

Could a rubber ball bounce off a frictionless surface?


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread