Subject: [xsl] Newbie Question From: "Varley, Roger" <Roger.Varley@xxxxxxxxxxx> Date: Fri, 17 May 2002 09:51:49 +0100 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Fw: [xsl] newbie question, Roma Yankin | Thread | Re: [xsl] Newbie Question, Jeni Tennison |
Re: [xsl] Regarding XSL performance, Mike Brown | Date | RE: [xsl] Re: Adjusting sorted list, TSchutzerWeissmann |
Month |