This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: generate unknow table


Sorry, I did not see your response until now.
Thanks a lot for response.
Here is my real case XML:
<?xml version="1.0"?>
<display>
	<title>
		<field id="sel" ND="flag80">Sel</field>
		<field id="sflbr">Br</field>
		<field id="sflcyc">Cycle</field>
		<field id="sfsts">P/I Status Description</field>
		<field id="pidate">P/I Date</field>
	</title>
	<data>
		<record>
			<sflbr>001</sflbr>
			<sflcyc>200</sflcyc>
			<sel flag80="off">12</sel>
			<sfsts>This is a description</sfsts>
			<pidate>06-02-01</pidate>
		</record>
		<record>
			<sflbr>002</sflbr>
			<sflcyc>210</sflcyc>
			<sel  flag80="off">11</sel>
			<sfsts>This is a description too</sfsts>
			<pidate>06-11-01</pidate>
		</record>
	</data>
</display>

1) yes, if there is a field with id="sel" in <title> element,
	there must be a element <sel> in the record. no missing field.

2) no. the order is determined by the title. in the record the order may
vary.

3) Yes. the <table> element is the <table> tag in HTML. The order in the
table is
   determined by the order of the <field> element in the <title> element.

Actually, these are two parts. The <title> element is
pre-generated statically from a display control file. and
<data> is generated dynamically from database. whether the certain
field is displayed or not is determined by the "flag80" attribute
at run time.

If someone can help, that will be great, if not, could someone
tell me it is impossible for XSLT to do this kind of job?

Thanks a lot.

-John

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Thomas B.
Passin
Sent: Monday, June 11, 2001 4:43 PM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] generate unknow table


[John Wang]
>
> I have posted this question few days ago. It seems no body
> even give a try to answer this question. Could someone tell
> me this is impossible in XSLT? Or my question is not clear?
>

1) Will there always be a field (in each record) to match one of the field
names given in the <title> element?  (That is, no missing fields).

2) Will the fields in a record always occur in the same order?  If so, will
that order match the order of the field names given in the <title> element?

3) When you say "table", do you mean an ordinary HTML table (it looks like
that from your sample)?  If so, will the order of fields in the table be
different from that order in the xml document?

Tom P


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]