Creating a numeric ID Attribute

Discussion in 'XML' started by Victor Engmark, Feb 2, 2005.

  1. Hello all,

    I'm working on an XML Schema to define the rules for valid data to
    import into a database. However, it seems that the datatype xs:ID
    requires a _letter_ as the first character, and my IDs are numeric.

    Is there any other standard XML Schema datatype which has the same
    restrictions as xs:ID, without the restriction on the first letter? If
    not, how can I create such a datatype?

    --
    Victor Engmark
    Q - Why do computer geeks celebrate Halloween on Christmas?
    A - Because OCT 31 equals DEC 25.
     
    Victor Engmark, Feb 2, 2005
    #1
    1. Advertising

  2. Hi Victor,

    Depending on what you are trying to achieve, you might be able to use
    xs:unique/xs:key/xs:keref to enforce uniqueness.

    --
    Stan Kitsis
    Program Manager, XML Technologies
    Microsoft Corporation

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

    "Victor Engmark" <> wrote in message
    news:ctqlr9$j2i$...
    > Hello all,
    >
    > I'm working on an XML Schema to define the rules for valid data to import
    > into a database. However, it seems that the datatype xs:ID requires a
    > _letter_ as the first character, and my IDs are numeric.
    >
    > Is there any other standard XML Schema datatype which has the same
    > restrictions as xs:ID, without the restriction on the first letter? If
    > not, how can I create such a datatype?
    >
    > --
    > Victor Engmark
    > Q - Why do computer geeks celebrate Halloween on Christmas?
    > A - Because OCT 31 equals DEC 25.
     
    Stan Kitsis [MSFT], Feb 2, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. aragon
    Replies:
    0
    Views:
    441
    aragon
    Feb 16, 2004
  2. Maarten van Reeuwijk
    Replies:
    0
    Views:
    275
    Maarten van Reeuwijk
    Feb 6, 2004
  3. Replies:
    5
    Views:
    942
    X-Centric
    Jun 30, 2005
  4. darrel
    Replies:
    4
    Views:
    824
    darrel
    Jul 19, 2007
  5. jobs

    int to numeric numeric(18,2) ?

    jobs, Jul 21, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    968
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Jul 22, 2007
Loading...

Share This Page