name space style sheet transform question

Discussion in 'XML' started by bjam, Apr 26, 2005.

  1. bjam

    bjam Guest

    Hi, I am confused here as I am just trying to convert the following XML
    file and trying to create a sample xsl to recognize even one of the
    nodes does not seem to be working here... Could this be a name space
    issue? I tried adding the rep namespace and setting it equal to the
    xmlns for xsl but this did not work either... any ideas on how to get
    my style sheet to recognize this xml file? Thanks in advance for your
    help with this it is appreciated.

    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:template match="/">
    <xsl:for-each select="//amountAtDate">
    <xsl:value-of select="text()"/>
    </xsl:for-each>
    </xsl:template>

    </xsl:stylesheet>


    xml document below ( forget the - signs these are from the browser)

    <?xml version="1.0" encoding="UTF-8" ?>
    - <rep:FrontPage xmlns:rep="http://localhost:7001/reporting">
    <rep:dateGenerated q="1">Fri Apr 1 14:49:29 2005</rep:dateGenerated>
    <rep:dateGeneratedTimeZone q="1">Eastern Standard Time
    (US/Eastern)</rep:dateGeneratedTimeZone>
    - <rep:client>
    <rep:client_id q="0">6237</rep:client_id>
    <rep:client q="1">Citadel Credit Trading Ltd.</rep:client>
    <rep:clientShort q="1">Citadel Credit Trading</rep:clientShort>
    </rep:client>
    <rep:date q="1">2005-03-31-05:00</rep:date>
    <rep:previousDate q="1">2005-03-30-05:00</rep:previousDate>
    - <rep:frontPageSection>
    <rep:sectionName q="1">GLOBAL MARGIN ROLL-UP (USD)</rep:sectionName>
    - <rep:sectionLine>
    <rep:lineName q="1">MARGIN EQUITY</rep:lineName>
    <rep:amountAtDate q="0">11006732.908899993</rep:amountAtDate>
    <rep:amountAtPreviousDate
    q="0">-539473.0115977892</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">HOUSE REQUIREMENTS</rep:lineName>
    <rep:amountAtDate q="0">7941634.67709</rep:amountAtDate>
    <rep:amountAtPreviousDate q="0">0</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">HOUSE MARGIN EXCESS/DEFICIT</rep:lineName>
    <rep:amountAtDate q="0">3065098.23181004</rep:amountAtDate>
    <rep:amountAtPreviousDate
    q="0">-539473.011597789</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">CASH AVAILABLE</rep:lineName>
    <rep:amountAtDate q="0">3065098.23181004</rep:amountAtDate>
    <rep:amountAtPreviousDate
    q="0">-539473.011597789</rep:amountAtPreviousDate>
    </rep:sectionLine>
    </rep:frontPageSection>
    - <rep:frontPageSection>
    <rep:sectionName q="1">US COMBINED MARGIN PB</rep:sectionName>
    - <rep:sectionLine>
    <rep:lineName q="1">LONG MARKET VALUE</rep:lineName>
    <rep:amountAtDate q="0">91617178.1389</rep:amountAtDate>
    <rep:amountAtPreviousDate q="0">0</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">SHORT MARKET VALUE</rep:lineName>
    <rep:amountAtDate q="0">-5365772.36</rep:amountAtDate>
    <rep:amountAtPreviousDate q="0">0</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">CASH BALANCE CR (DR)</rep:lineName>
    <rep:amountAtDate q="0">-75857105.73</rep:amountAtDate>
    <rep:amountAtPreviousDate q="0">0</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">BOND ACCRUED INTEREST</rep:lineName>
    <rep:amountAtDate q="0">612432.86</rep:amountAtDate>
    <rep:amountAtPreviousDate q="0">0</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">REG U EXCESS/DEFICIT</rep:lineName>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">MARGIN EQUITY</rep:lineName>
    <rep:amountAtDate q="0">11006732.908899993</rep:amountAtDate>
    <rep:amountAtPreviousDate q="0">0</rep:amountAtPreviousDate>
    </rep:sectionLine>
    </rep:frontPageSection>
    - <rep:frontPageSection>
    <rep:sectionName q="1">EQUITY SWAPS</rep:sectionName>
    - <rep:sectionLine>
    <rep:lineName q="1">MTM AMOUNT EXPOSURE NY</rep:lineName>
    <rep:amountAtDate q="0">0</rep:amountAtDate>
    <rep:amountAtPreviousDate
    q="0">-498944.5678497</rep:amountAtPreviousDate>
    </rep:sectionLine>
    - <rep:sectionLine>
    <rep:lineName q="1">MTM AMOUNT EXPOSURE LDN</rep:lineName>
    <rep:amountAtDate q="0">0</rep:amountAtDate>
    <rep:amountAtPreviousDate
    q="0">-40528.4437480892</rep:amountAtPreviousDate>
    </rep:sectionLine>
    </rep:frontPageSection>
    </rep:FrontPage>
    bjam, Apr 26, 2005
    #1
    1. Advertising

  2. bjam

    bjam Guest

    Even when using the following style sheet i get no data

    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:rep="http://localhost:7001/reporting">

    <xsl:template match="/">
    <xsl:value-of
    select="rep:FrontPage/rep:frontPageSection/rep:sectionLine/rep:lineName"/>
    </xsl:template>



    </xsl:stylesheet>
    bjam, Apr 26, 2005
    #2
    1. Advertising

  3. In article <>,
    bjam <> wrote:
    >Even when using the following style sheet i get no data


    Looks OK to me, and works with the stylesheet processors I have to
    hand.

    -- Richard
    Richard Tobin, Apr 26, 2005
    #3
  4. bjam

    bjam Guest

    Richard,

    Thanks for this... for some unknown reason this would not show up in
    XML spy until I put HTML tags around it... go figure.. It did work
    from the commandline perl libs that I was using to do XSLT though.
    Thanks again for investigating this for me I really appreciate your
    efforts.
    bjam, Apr 28, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    514
  2. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,884
    Bryan Bullard
    Jul 11, 2003
  3. Christian Seberino
    Replies:
    21
    Views:
    1,649
    Stephen Horne
    Oct 27, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    1,006
    Steve Lamb
    Oct 23, 2003
  5. Ian Bicking
    Replies:
    2
    Views:
    717
    Michael Hudson
    Oct 24, 2003
Loading...

Share This Page