preserve-sdata?

Subject: preserve-sdata?
From: "Maltby, David G" <david.g.maltby@xxxxxxxx>
Date: Mon, 13 Sep 1999 08:05:22 -0700
Hello All -

I am doing -tsgml transformations with OpenJade v1.2.1.  I have set the
preserve-sdata? characteristic to #t.  Preserve-sdata is doing what I expect
except in the one case where I am combining data from entries in a row into
a sosofo.

The relevant code from my style-sheet is:

(element (EQUIP-REQUIRED TABLE TGROUP TBODY ROW)
 ;;; choices in the EQ dialog
 (make element gi: "choice"	
  (make element gi: "text"
            attributes: (list (list "type" "PRE"))
   (sosofo-append
    ;;; ... need to reverse the order of the 1st and 2nd entries and ignore
the 3rd
    ;;;     firstEntry-text-data must start as the 45th char
    (literal (trunc-secondEntry-text-data))	; Item description
    (literal (copy-string " " (- 45 (string-length
(trunc-secondEntry-text-data)))))
    (literal (firstEntry-text-data))	; Reference
   )
  )
;;;... more nested (make element ...)s		
 ) ; end choice
)

(define (trunc-secondEntry-text-data)
 (if (< (string-length (secondEntry-text-data)) 44)
  (secondEntry-text-data)
  (substring (secondEntry-text-data) 0 44)))

(define (secondEntry-text-data)
 (data (select-elements (children 
  (node-list-first (node-list-rest 
   (select-elements (children (current-node)) "ENTRY")))) "TEXT")))

(define (firstEntry-text-data)
 (data (select-elements (children	
  (node-list-first 
   (select-elements (children (current-node)) "ENTRY"))) "TEXT")))

The following row from one of the source tables...

<table frame="bottom" colsep="0" rowsep="0">
 <tgroup cols="3" colsep="0" rowsep="0">
 <!-- colspec and thead removed for brevity -->
 <tbody>
  <row>
   <entry colname="col1"><text>&dtri;MIL-P-36792</text></entry>
   <entry colname="col2"><text>Alcohol Pad, Sterile</text></entry>
   <entry colname="col3"><text>&square;</text></entry>
  </row>
  <!-- more rows -->
 </tbody>
</table>

... transforms to ...

<TEXT TYPE="PRE">Alcohol Pad, Sterile
?MIL-P-36792</TEXT>

In all other cases, sdata is preserved.  I am reasonably confident that the
(literal ) sosofo is doing what it says, it is literally writing out the
string.  However I can not come up with an idea on how to get the data from
the table and form a sosofo given that the stuff after the space has to
start a fixed number of characters from the beginning.

Would something with (process-node-list) be a reasonable place to start?


Regards,
David Maltby, IETM Team, Lockheed Martin Missile and Space
"Hoping to duck Floyd"



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


Current Thread
  • preserve-sdata?
    • Maltby, David G - Mon, 13 Sep 1999 12:08:14 -0400 (EDT) <=