This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Query regarding element context in XSL.........
- To: "XSL-List at lists dot mulberrytech dot com" <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Query regarding element context in XSL.........
- From: Sanjeev Pai <sanjeevpai at yahoo dot com>
- Date: Thu, 4 Oct 2001 12:07:01 -0700 (PDT)
- Cc: sanjeevpai at yahoo dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
I have the following XML snippet from a JAXB schema-
<xml-java-binding-schema version="1.0-ea">
<element name="CreateCaseView" type="class" root="true"/>
<element name="partyId" type="value" convert="String"/>
<element name="stateDateTime" type="value"
convert="GregorianCalendar"/>
<conversion name="String" type="java.lang.String"/>
<conversion name="GregorianCalendar"
type="java.util.GregorianCalendar"/>
</xml-java-binding-schema>
I am trying to generate the .java file from this XML using XSL. The
point where I am stumped is mapping the convert attribute of <element>
to the name attribute of <conversion> so that I canget a line like the
following -
private hava.util.GregorianCalendar _stateDateTime;
I am using something like the following code which is not working -
<xsl:for-each
select="element[@type='value'][./@convert=../conversion/@name]">
<xsl:text> private </xsl:text>
<xsl:value-of
select="../conversion[./@convert=../conversion/@name]/@type" />
<xsl:value-of select="./@name" />
<xsl:call-template name="newline"/>
</xsl:for-each>
Please help.
Rgds,
sanjeev pai
=====
---------------------------------------------------------
!!!Have a nice day!!!
---------------------------------------------------------
__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list