Subject: Problem with SGML to SGML Conversion From: Roland Schopf <Roland.Schopf@xxxxxxxxxxx> Date: Fri, 21 Jan 2000 10:02:05 +0100 |
Hi all,
I'm trying to extract the content of an element of a tablecell and insert the value as an attribute of the whole row
(normally only one <number> exits per row):
<table>
<row rowsep="1" colsep="0">
<entry>xxxx</entry>
<entry>yyy</entry>
<entry>zzzz</entry>
<entry><number>1234</number></entry>
</row>
into:
<table>
<row rowsep="1" colsep="0" number="1234">
<entry>xxxx</entry>
<entry>yyy</entry>
<entry>zzzz</entry>
<entry><number>1234</number></entry>
</row>
Using the following dsssl script, I receive the error:
invalid value for "attributes" characteristic
I also tried (parent(parent(current-node)),
(element row
(let ((nl_versorgungsnummern (select-elements (descendants (current-node)) "number")))
(sosofo-append
(if (node-list-empty? nl_number)
(empty-sosofo) ; do nothing
(process-children)
)
(with-mode m_number
(process-node-list nl_number)
)
)
)
)
(mode m_number
(default
(make empty-element gi: "ROW"
attributes: (list
(list "NUMBER" (data(current-node)))
(list "ROWSEP" (attribute-string "ROWSEP" (ancestor "ROW" (current-node))))
(list "ROWSEP" (attribute-string "ROWSEP" (ancestor "ROW" (current-node))))
)
)
)
)
(define (output-element #!optional (node (current-node)))
(if (node-property "must-omit-end-tag?" node)
(make empty-element
attributes: (copy-attributes))
(make element
attributes: (copy-attributes))))
(define (copy-attributes #!optional (nd (current-node)))
(let loop ((atts (named-node-list-names (attributes nd))))
(if (null? atts)
'()
(let* ((name (car atts))
(value (attribute-string name nd)))
(if value
(cons (list name value)
(loop (cdr atts)))
(loop (cdr atts)))))))
(default (output-element)) ; keep all other elements
;;;;;;;;;;;;;;;;;;;;;;;;;;
I tried several approaches, but I couldn't get the value of ROWSEP and COLSEP.
Maybe someone can help me.
Thanks
Roland
------------------------------------------------------------------------------------
Roland Schopf Sema Group GmbH
Carl-Zeiss-Ring 6 Phone: +49 89 996524-55
85737 Ismaning Fax: +49 89 996524-44
GERMANY E-Mail:roland.schopf@xxxxxxxxxxx
------------------------------------------------------------------------------------
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Does the OpenJade SGML backend prov, Stefan Dalibor | Thread | Re: Problem with SGML to SGML Conve, Jany Quintard |
Does the OpenJade SGML backend prov, Stefan Dalibor | Date | Re: Problem with SGML to SGML Conve, Jany Quintard |
Month |