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>
'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...)
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:
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
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
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
is working on a reply...