Re: Convention versus standard
I know this is a back door way to ask what is possibly an xslt question, but it sort of relates here as well. The XPATH standards says a number is:  Number ::= Digits <http://www.w3.org/TR/xpath#NT-Digits> ('.' Digits <http://www.w3.org/TR/xpath#NT-Digits>?)? | '.' Digits <http://www.w3.org/TR/xpath#NT-Digits>  Digits ::= [0-9]+ That of course means a Number can start with a '0'. Now by convention a number starting with 0 is often interpreted as octal and it seems that libxml from xml.com indeed makes that assumption - trying to interpret 00000000000000999900 as an octal (and therefore invalid) number. But this definition of a number doesn't allow for the 0x convention of a hexadecimal number... The standard also mentions that you shouldn't try to interpret an element as a number unless it is a number in the natural language it comes from. Which means the above is open to all sorts of interpretations - it's natural to a computer, but not a person etc I'd like to be able to say to our business partners that this is not the right way to express a number (in fact they want 99.99 - which is another problem and brings the expr function into play) and they should drop the leading zeroes. But I can't do that without the backing of the standards. Comments? Help? Thanks Rick Michael Kay wrote: >> It is common practice for programmers to name variables in >> numerous non-helpful ways, it is best practice to have a well >> thought out naming scheme that allows those who maintain code >> to know what a variable is to be used for, hopefully >> achievable by following the coding styles for their languages >> and organizations >> > > My experience is that an intelligent programmer using their own common sense > will usually produce much more helpful variable names than a programmer who > is blindly following rules defined by some corporate style police. > > Michael Kay > http://www.saxonica.com/ > > > _______________________________________________________________________ > > XML-DEV is a publicly archived, unmoderated list hosted by OASIS > to support XML implementation and development. To minimize > spam in the archives, you must subscribe before posting. > > [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ > Or unsubscribe: xml-dev-unsubscribe@l... > subscribe: xml-dev-subscribe@l... > List archive: http://lists.xml.org/archives/xml-dev/ > List Guidelines: http://www.oasis-open.org/maillists/guidelines.php >
begin:vcard fn:Rick Marshall n:Marshall;Rick org:Zenucom Pty Ltd adr:;;;;;;AUSTRALIA email;internet:rjm@z... tel;cell:+61 411 287 530 note;quoted-printable:UNIBASE, FORUM, DENARI, AUTOPAY, UNITE, UNIQUOTE=0D=0A= =0D=0A= Why buy business software when you can rent it? x-mozilla-html:TRUE url:www.zenucom.com version:2.1 end:vcard
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format