[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Newbie Question

Subject: Newbie Question
From: "Varley, Roger" <Roger.Varley@xxxxxxxxxxx>
Date: Fri, 17 May 2002 09:51:49 +0100
com.sun.forte4j.modules.dbmodel.schemaelement
Hi

I really thought I was getting the hang of XSLT, until this. I know what's
happening, the "catchall" template is outputting the value of the elements
it see's. What I don't understand is why?

Regards
Roger

XML File:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement"
ID="com.sun.forte4j.modules.dbmodel.SchemaElement-48455683">
   <impl>
      <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl"
ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl7035313">
         <element>
            <OBJECT
REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement-48455683" />
         </element>

         <QdriverName>JDBC-ODBC Bridge (ODBCJT32.DLL)</QdriverName>

         <tables>
            <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection"
ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1133113">
               <owner>
                  <OBJECT
REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl7035313
" />
               </owner>

               <Qelms>
                  <ARRAY SIZE="1" CLASS="PRIMITIVE"
ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
                     <ROW ROW="0">
                        <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.TableElement"
ID="com.sun.forte4j.modules.dbmodel.TableElement-1672359569">
                           <impl>
                              <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl"
ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl5090263">
                                 <columns>
                                    <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection"
ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1744354">
                                       <owner>
                                          <OBJECT
REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl5090263"
/>
                                       </owner>

                                       <Qelms>
                                          <ARRAY SIZE="29" CLASS="PRIMITIVE"
ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
                                             <ROW ROW="0">
                                                <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement"
ID="com.sun.forte4j.modules.dbmodel.ColumnElement1206291630">
                                                   <impl>
                                                      <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl"
ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl5041390">
                                                         <Qname>
                                                            <OBJECT
CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier"
ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5714231">
 
<name>account</name>
                                                            </OBJECT>
                                                         </Qname>

                                                         <Qprecision>
                                                            <OBJECT
CLASS="java.lang.Integer" ID="java.lang.Integer20">
 
<value>20</value>
                                                            </OBJECT>
                                                         </Qprecision>

                                                         <Qtype>12</Qtype>

                                                         <element>
                                                            <OBJECT
REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1206291630" />
                                                         </element>

                                                         <Qscale>
                                                            <OBJECT />
                                                         </Qscale>

 
<QisNullable>true</QisNullable>

                                                         <Qlength>
                                                            <OBJECT
REFERENCE="java.lang.Integer20" />
                                                         </Qlength>
                                                      </OBJECT>
                                                   </impl>

                                                   <declaringTable>
                                                      <OBJECT
REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-1672359569" />
                                                   </declaringTable>
                                                </OBJECT>
                                             </ROW>
                                          </ARRAY>
                                       </Qelms>
                                    </OBJECT>
                                 </columns>
                              </OBJECT>
                           </impl>
                        </OBJECT>
                     </ROW>
                  </ARRAY>
               </Qelms>
            </OBJECT>
         </tables>
      </OBJECT>
   </impl>
</OBJECT>

XSL File:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes"/>


<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>  

<xsl:template match="name">
Match Found
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="*">
<xsl:apply-templates/>
</xsl:template>
 

</xsl:stylesheet>

Output is

JDBC-ODBC Bridge (ODBCJT32.DLL) Match Found account 20 12 true 

************************************************************************
Information in this message is confidential and may be privileged.  It is
for the exclusive use of the intended recipient(s).  If you are not the
intended recipient(s) please notify the sender and delete the message
immediately.  Unauthorised disclosure, distribution and copying of this
email is strictly prohibited.  The opinions expressed within this message
are those of the individual author.  Whilst Brakes takes reasonable steps to
scan this email it does not accept liability for any virus that may be
contained in it.

Brake Bros plc. Registered Office: Enterprise House, Eureka Business Park,
Ashford, Kent TN25 4AG.
 Registered in England & Wales number 2035315.

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.