Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Niels Kristiansen 166 posts 382 karma points
    Aug 16, 2011 @ 13:36
    Niels Kristiansen
    0

    Anyone that can help? XSLT, jesper.sql and node(@createDate)

    Hi,

    I have som difficulties getting the @createDate from the node when getting member information with SQL, when I try to use jesper.sql in XSLT. Either I get the whole node or nothing at all. Here is the SQL I have used:

    SELECT 
      CAST(x.xml AS XML).query('/node/data[@alias="isActive"]') AS isActive, 
      CAST(x.xml AS XML).query('/node[@createDate]') AS generatedDate,
      CAST(x.xml AS XML).query('/node/data[@alias="compEmail"]') AS compEmail, 
      CAST(x.xml AS XML).query('/node/data[@alias="compApprove"]') AS compApprove
    FROM cmsContentXml AS x 
    INNER JOIN cmsMember AS m ON x.nodeId = m.nodeId

    What can I do to make it work. The only thing I need from the <node> is ex <node ... createDate="2010-07-17T13:34:36" ...>...</node>

    Hope someone can help me out here :)

     

    Kind regards,

    Niels

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Aug 16, 2011 @ 13:45
    Chriztian Steinmeier
    0

    Hi Niels

    'node/@createDate' is the XPath syntax to grab that - what you're saying with 'node[@createDate]' is: "Give me the node that has a @createDate attribute" (which they all have...)

    /Chriztian 

  • Niels Kristiansen 166 posts 382 karma points
    Aug 16, 2011 @ 14:08
    Niels Kristiansen
    0

    Hi Chriztian,

    Yep, I tried that out, but got the following error:

    Attribute may not appear outside of an element

    Maybe it's not supported in the version of jesper.sql I'm running :S 

     

Please Sign in or register to post replies

Write your reply to:

Draft