Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Exporting a part of an XSD (http://www.velocityreviews.com/forums/t167564-exporting-a-part-of-an-xsd.html)

Mhaxx 07-29-2004 01:55 PM

Exporting a part of an XSD
 
I'd like to export my XML data type definitions into a separate file, so
I can use them from other XSD: how can I do?

Mhaxx


<<<example.xsd>>>

<?xml version="1.0" encoding="iso-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.com"
xmlns="http://www.example.com"
elementFormDefault="qualified">


<!-- * * * * * DATA TYPES DEFINITION * * * * * -->

<xsd:complexType name="pointType">
<xsd:sequence>
<xsd:element name="x" type="xsd:nonNegativeInteger"/>
<xsd:element name="y" type="xsd:nonNegativeInteger"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="extensionType">
<xsd:sequence>
<xsd:element name="height" type="xsd:positiveInteger"/>
<xsd:element name="width" type="xsd:positiveInteger"/>
</xsd:sequence>
</xsd:complexType>


<!-- * * * * * * SCHEMA DEFINITION * * * * * * -->

<xsd:element name="project">
<xsd:complexType>
...
...
</xsd:complexType>
</xsd:element>

</xsd:schema>

Martin Honnen 07-29-2004 02:13 PM

Re: Exporting a part of an XSD
 


Mhaxx wrote:

> I'd like to export my XML data type definitions into a separate file, so
> I can use them from other XSD: how can I do?


Check out <xs:include>, see
http://www.w3.org/TR/xmlschema-0/#SchemaInMultDocs
http://www.w3.org/TR/xmlschema-1/#element-include

--

Martin Honnen
http://JavaScript.FAQTs.com/


Mhaxx 07-29-2004 03:47 PM

Re: Exporting a part of an XSD
 
> Check out <xs:include>, see
> http://www.w3.org/TR/xmlschema-0/#SchemaInMultDocs
> http://www.w3.org/TR/xmlschema-1/#element-include


Good, but Pollo seems not to load include xsd. What about Pollo to
validate XSD? Others good XML validator?

Mhaxx

Martin Honnen 07-30-2004 10:37 AM

Re: Exporting a part of an XSD
 


Mhaxx wrote:

>> Check out <xs:include>, see
>> http://www.w3.org/TR/xmlschema-0/#SchemaInMultDocs
>> http://www.w3.org/TR/xmlschema-1/#element-include

>
>
> Good, but Pollo seems not to load include xsd. What about Pollo to
> validate XSD? Others good XML validator?


I don't know Pollo, I use Java Xerces as available in the jEdit editor
(http://www.jedit.org/) and MSXML 4 from Microsoft and occasionally MS
..NET ValidatingReader.

--

Martin Honnen
http://JavaScript.FAQTs.com/


Mhaxx 07-30-2004 11:50 AM

Re: Exporting a part of an XSD
 
> I don't know Pollo, I use Java Xerces as available in the jEdit editor

Can I use it as XML validator, too?

Mhaxx

Martin Honnen 07-30-2004 12:03 PM

Re: Exporting a part of an XSD
 


Mhaxx wrote:

>> I use Java Xerces as available in the jEdit editor

>
>
> Can I use it as XML validator, too?


If you install the XML plugins available then jEdit validates against
DTDs and W3C XML schemas.

--

Martin Honnen
http://JavaScript.FAQTs.com/



All times are GMT. The time now is 05:49 PM.

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