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

RE: Date YYYYMMDD format XSLT 2.0 (with string Update)

Subject: RE: Date YYYYMMDD format XSLT 2.0 (with string Update)
From: "Pankaj Chaturvedi" <pankaj.chaturvedi@xxxxxxxxx>
Date: Tue, 16 Sep 2008 18:15:07 +0530
RE:  Date YYYYMMDD format XSLT 2.0 (with string Update)
<chapter version="Feb. 2000"/>
<chapter version="Oct. 2006 Update">


Apart from this I need to ignore attributes values with "Update" (<chapter
version="Dec. 2003 Update">) which I will be able to handle with string
check (contains() function)



========
Once again, is the below code is correct for "xsl:analyze-string" for cases
where @version contains string ' Update'. 

<xsl:analyze-string select="substring-before(string(./@version), ' Update')"
regex="{ $re }">

 seems to error in select="" though XMLSpy does not gives any error. I am
trying to conditional test of @version with and without 'Update' string.

Thanks

 

> -----Original Message-----
> From: Pankaj Chaturvedi [mailto:pankaj.chaturvedi@xxxxxxxxx]
> Sent: 16 September 2008 09:49
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Date YYYYMMDD format XSLT 2.0
> 
> 
> Hi,
> 
> I have an element which has the date in the below format in an
> attribute:
> 
> Input
> ================
> <chapter version="Feb. 2000"/>
> 
> The date could be optional can be taken as 01 by default. So the 
> desired output required in "YYYYMMDD format".
> 
> Output Required
> ================
> <chapter version="20000201"/>
> 
> 
> I've been going thru the Michael Kay's book and found it has an 
> example which does the trick vice versa. I mean YYYYMMDD to 01 Feb 
> 2000 for instance.
> 
> I am using the  XSLT 2.0 and thinking of using translate() functions 
> (for
> months) to get this done. Is there any better way to achieve this? Any 
> suggestions will be highly appreciated.
> 
> Best,
> 
> Pankaj Chaturvedi
> 
> ==============================================================
> ==============
> ================
> 
> 
> Confidentiality Notice:" This message and any attachment(s) contained 
> here are information that is confidential, proprietary to IDS Infotech 
> Ltd. and its customers.
> Contents may be privileged or otherwise protected by law. The 
> information is solely intended for the individual or the entity it is 
> addressed to. If you are not the intended recipient of this message, 
> you are not authorized to read, forward, print, retain, copy or 
> disseminate this message or any part of it. If you have received this 
> e-mail in error, please notify the sender immediately by return e-mail 
> and delete it from your computer."

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.