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

Query regarding element context in XSL.........

Subject: Query regarding element context in XSL.........
From: Sanjeev Pai <sanjeevpai@xxxxxxxxx>
Date: Thu, 4 Oct 2001 12:07:01 -0700 (PDT)
sanjeev pai
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


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.