Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   howto extract type pattern from xsd shema file / or DOM Document object from JAVA (http://www.velocityreviews.com/forums/t543503-howto-extract-type-pattern-from-xsd-shema-file-or-dom-document-object-from-java.html)

andrzej.gdula@gmail.com 10-11-2007 09:18 AM

howto extract type pattern from xsd shema file / or DOM Document object from JAVA
 
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>
__________________________________________________ _______



All times are GMT. The time now is 11:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.