howto extract type pattern from xsd shema file / or DOM Document object from JAVA

Discussion in 'Java' started by andrzej.gdula@gmail.com, Oct 11, 2007.

  1. Guest

    I'd like to extract the value "[a-z]{1,10} " from
    <pattern value="[a-z]{1,10}"></pattern>
    For given Node of JDOM

    how to deal with this problem. Do i have to parse the xsd file using
    SAX or JDOM, and get the pattern form Document ?
    Is there any other way to do this ?

    here is the code of schema file
    home.xsd :
    _________________________________________________________

    <?xml version="1.0" encoding="UTF-8"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.java3d.gkiro.zti.iinf.ps/budynek"
    xmlns:b="http://www.java3d.gkiro.zti.iinf.ps/budynek"
    xmlns:Q1="http://www.java3d.gkiro.zti.iinf.ps/budynek">
    [...]
    <complexType name="TypeWall">
    [...]
    <attribute name="color" type="b:Color" use="optional"
    default="0.0">
    </attribute>
    </complexType>
    [...]
    <simpleType name="Color">
    <restriction base="string">
    <pattern value="[a-z]{1,10}"></pattern>
    </restriction>
    </simpleType>
    [...]
    </schema>
    _________________________________________________________
     
    , Oct 11, 2007
    #1
    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. jg
    Replies:
    1
    Views:
    741
    =?Utf-8?B?U2hhaWxlc2ggSmFubnU=?=
    Aug 17, 2004
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    506
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Casper B
    Replies:
    1
    Views:
    1,289
    Stanimir Stamenkov
    Jan 29, 2005
  4. Replies:
    0
    Views:
    570
  5. Dmitry Kulinich
    Replies:
    4
    Views:
    1,093
    Dmitry Kulinich
    Feb 19, 2007
Loading...

Share This Page