At 00/07/05 07:27 -0400, Bruce Peat wrote:
>One of the problems facing B2B developers with XSLT is that the XML instance
>needs to run 'in-memory' real or virtual memory because XSLT doesn't have
>scope control as a tool based on input source

I'm not sure what you mean by that ...

>- making  translation of some
>B2B type messages difficult (slow) if not impossible.

... so I can't follow to this conclusion.  My impression is that XSLT would 
be ideal because B2B transactions will be small and plentiful rather than 
large and monolithic.

I say "ideal" because one doesn't need to write a large imperative 
"transformation by program code" program to get accomplish translation when 
a declarative "transformation by example" set of templates.

>Ken,
>
>Question on XSLT, I want to know if I have children, if I do I want to start
>an HTML table structure, and if I don't have children, I simply want to
>display some attribute information.  How one know at the parent node this
>information,

On the parent node ...

Consider the structure where <desc> is optional:

    <partNbr id="a123">
       <desc>A bolt for a nut.</desc>
    </partNbr>

And the stylesheet template rule:

  <xsl:template match="partNbr"> <!--handle a part number-->
    <xsl:choose>
      <xsl:when test="desc"> <!--if the child "desc" exists"-->
        <table>
          <tr>
            <td><xsl:value-of select="@id"/></td>
            <td><xsl:value-of select="desc"/></td>
          </tr>
        </table>
      </xsl:when>
      <xsl:otherwise> <!--a child "desc" does not exist"-->
        <p>Undescribed part number</p>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

Above I have hardwired the table creation ... you could just ask for the 
children to be processed through template rules if there are other 
decisions to be made about the child content.

>or is this handled with flag variables on the first occurance
>of the child?

Nope.

>Hope this question makes sense.

I think it did ... does the answer jibe?

XSL, XSLT and XPath questions would be better posted to the following list:

   http://www.mulberrytech.com/xsl/xsl-list

There are a number of subscribers who would enthusiastically respond to 
such questions.

There is also an *excellent* FAQ at:

   http://www.dpawson.co.uk

Thanks!

.............. Ken

--
G. Ken Holman                    mailto:[EMAIL PROTECTED]
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/e/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999   (Fax:-0995)
Web site: XSL/XML/DSSSL/SGML services, training, libraries, products.
Book: Practical Transformation Using XSLT and XPath ISBN1-894049-04-7
Next instructor-led training:    2000-09-19/20,2000-10-03,2000-10-04,
-                                    2000-10-05,2000-11-13,2001-01-27



------   XML/edi Group Discussion List   ------
Homepage =  http://www.XMLedi-Group.org

Unsubscribe =  send email to: [EMAIL PROTECTED]
Leave the subject and body of the message blank

Questions/requests:  [EMAIL PROTECTED]

To receive only one message per day (digest format) 
send the following message to [EMAIL PROTECTED], 
(leave the subject line blank) 

digest xmledi-group your-email-address

To join the XML/edi Group complete the form located at:
http://www.xmledi-group.org/xmledigroup/mail1.htm


Reply via email to