473,395 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

XSL Transform by DataType

Hello,

I am trying to find a way to format an XML attribute using XSL. I want to
run the format based on the datatype of the attribute.

I need to remove everything from the "-" in a attribute that is defined as a
datetime. I cannot go by the actual attribute name I need to process based
on data type. Any assistance would be greatly appreciated.

<s:Schema id="RowsetSchema">
<s:ElementType name="row" content="eltOnly" rs:updatable="true">
... more attributes just not showing them all...
<s:AttributeType name="BirthDate" rs:number="3">
<s:datatype dt:type="dateTime" dt:maxlength="-1"
rs:maybenull="True" />
</s:AttributeType>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row BirthDate="1913-08-08T00:00:00.0000000-05:00" />
<z:row BirthDate="1920-08-08T00:00:00.0000000-06:00" />
<z:row BirthDate="1921-08-08T00:00:00.0000000-05:00" />
<z:row BirthDate="1925-08-08T00:00:00.0000000-06:00" />
<z:row BirthDate="1918-08-08T00:00:00.0000000-05:00" />
<z:row BirthDate="1935-08-08T00:00:00.0000000-06:00" />
</rs:data>
Nov 12 '05 #1
1 878
Hi Deck,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to filter out all the dateTime
nodes in an Xml document. If there is any misunderstanding, please feel
free to let me know.

As far as I know, XSL cannot check a node for its type. Since all the
dateTime values are in certain format, you can try to use a regular
expression and search according to it.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Lehmann | last post by:
I have an interesting problem. I am performing an XSL transform using the System.Xml.Xsl.Transform class. I have a database that contains the XSL style sheet string. And it seems to work pretty...
8
by: Eternally | last post by:
Hi folks, I've got a program which has a function which uses templates to accept parameters of any type. Works well, but there's one certain datatype which I want to special case and do an...
2
by: sam | last post by:
Hi, I've been buried in xsl and xslt articles for several days now, and am still unsure as to what I need to do... Basically, my vb.net app loads up an XML file from an external source...
7
by: Doug Heeren | last post by:
I have the following section of VB.NET code that transforms a simple dataset into an Excel xml workbook. It works fine for < 50 rows or so, but I have about 8,000 rows I need to transform. Is there...
3
by: Andy | last post by:
Hi all, I'm having a problem doing an Xslt transform in code. I've done it before, so I'm not really sure why its not working. The problem is that the result of the transform is an empty...
6
by: Vijai Kalyan | last post by:
Hello, I am trying to use std::transform to take in a collection of strings, transform them and insert the result into an output container. So, I wrote something like this: std::wstring...
4
by: Orchid | last post by:
How can I change a Date datatype to a Number datatype? For example, I want a date 10/31/2006 to show 1031 as Number datatype. But I don't want it becomes 39021. What formula should I use? ...
18
by: B D Jensen | last post by:
Hello! I have an big table with 50Gb data, written som functions that cleanup data and want to do something like this insert into newtable select id, func1(col1), func2(col2) from oldtable; ...
3
by: Wizfrog | last post by:
Hello, I am using XSL to transform a XML file into a HTML output. classic so, I have a tag calling an image with a local path as <img src="images/myimage.jpg"/> nothing really strange...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.