SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member Dakkar Daemor's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Javascript regularexp and XML Schema patterns

    Hi.

    How can I translate XML-Schema patterns into JavaScript regex?

    If I remember well.. they are both in Perl regex syntax, is right???


    TYIA
    --------------------------------
    Ytanium
    Sublimated Dreams
    Imaginific

  2. #2
    SitePoint Member Dakkar Daemor's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy

    no one is able to help me? Is a too difficult question????

    *disappointment*

    any JavaScript expert out there???

    --------------------------------
    Ytanium
    Sublimated Dreams
    Imaginific

  3. #3
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ever heard of google?

    XML-Schema patterns
    JavaScript regex

  4. #4
    SitePoint Member Dakkar Daemor's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sure I use it always... but is not always so easy find the right things...

    Thank you ^_^


    uhm... but I don't know if these links answer to my firt question: "javascript and xmlschema patterns" are "equal"?

    I can put a schema pattern into a javascript to validate a form field?

    TYIA
    --------------------------------
    Ytanium
    Sublimated Dreams
    Imaginific

  5. #5
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you looking for a generic method for checking a value against a data type? What is your goal? I can hel;p you with regex patterns, but need more of an example of what you are trying to do.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  6. #6
    SitePoint Member Dakkar Daemor's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks...

    ok I must generate an HTML form from a XML-Schema file.

    I must put some javascript code into the HTML form to "check" form fields datatype in relation to the types of the XML-Schema given. If they are simple types is quite easy, but I'm asking if it's easy also for patterns... I don't know if javascript and XML-Schema have the same pattern syntax... somewhere I read that they are Perl-style... but I'm not so expert in javascript or Schema to be sure of that...

    So: I can put a pattern from XML-Schema to Javascript without "pattern transformation" or I must translate them from schema to javascript, because they are different?


    TYIA
    --------------------------------
    Ytanium
    Sublimated Dreams
    Imaginific

  7. #7

  8. #8
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like I said the patterns are no big deal, creating the logic to use dynamic patterns based on schema types is another story. What does the Schema Pattern look like?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  9. #9
    SitePoint Member Dakkar Daemor's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well... I don't know. I must accept and validate any XML-Schema pattern...
    So I must use a translation function from the pattern to a regex?
    --------------------------------
    Ytanium
    Sublimated Dreams
    Imaginific


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •