Re: Extending ECF XML Schema

Electronic Court Filing

Extending ECF XML Schema


gknecht 05-30-2007, 12:16 PM
Can anyone describe, and provide an example of, how you've extended the XML schema for any ECF messages with your own court specific tags?

Re: Extending ECF XML Schema


gknecht 08-13-2007, 10:39 AM

Response from Rex McElrath from Georgia AOC:

 Sure, I can try to. I think the question is how to extend the ECF message, but if this isn't what is being asked, please let me know.

The basic concept is that you either add a brand new element or you redefine an existing element or complex type made up of a bunch of elements with new information or formatting.

For example (also attached as SchemaExtensionExample.zip), if there was an existing complex type called "bunny" in a schema and we wanted a special type called "easter bunny" we could make changes in an extension schema like the following:

Original schema (has 3 elements of longears, puffytail, bigfeet):

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

xmlns:b="www.bunny.com"

targetNamespace="www.bunny.com">

<xs:complexType name="bunny">

<xs:sequence>

<xs:element name="longears"/>

<xs:element name="puffytail"/>

<xs:element name="bigfeet"/>

</xs:sequence>

</xs:complexType>

<xs:element name="bunny" type="b:bunny"/> </xs:schema>

 

Extension schema (Adds 2 elements of largebasket and

penchanttosleep364days):

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema

xmlns:xs="http://www.w3.org/2001/XMLSchema"

xmlns:eb="www.easterbunny.com"

xmlns:b="www.bunny.com"

targetNamespace="www.easterbunny.com">

<xs:import namespace="www.bunny.com"

schemaLocation="/home/mcelratr/development/XML/SchemaExtensionExample/bu

nny.xsd"/>

<xs:complexType name="easterbunnytype">

<xs:complexContent>

<xs:extension base="b:bunny">

<xs:sequence>

<xs:element name="largebasket"/>

<xs:element name="penchanttosleep364daysofyear"/>

</xs:sequence>

</xs:extension>

</xs:complexContent>

</xs:complexType>

<xs:element name="easterbunny" type="eb:easterbunnytype"/> </xs:schema>

 

Example XML (shows instance will all 5 elements from both base and

extension):

<?xml version="1.0" encoding="UTF-8"?>

<eb:easterbunny xmlns:eb="www.easterbunny.com" xmlns:b="www.bunny.com"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="www.easterbunny.com ./easterbunny.xsd">

<longears/>

<puffytail/>

<bigfeet/>

<largebasket/>

<penchanttosleep364daysofyear/>

</eb:easterbunny>

 

Since the ECF is already an extension of the GJXDM, to extend it, you basically start at step two of extending an existing schema. Attached is an example from one of the proposals for format versions that shows jxdm:DocumentType being extended to include the format versions element.

There is a proviso to extending ECF. If extending the specification to be adopted by the TC for a new specification version, the extension method is as described above. If adding specific local extension elements in use of the ECF, there is a key/value pair method that is the recommended way to extend the data collected. The key/value pair (e.g.

- person=joe) isn't necessarily extending the schema as there is a location for their enumeration, but was chosen as what the TC thought would be the easiest manner for local courts to add new elements to be able to collect new data. If extension for local court elements is the type of extension you mean, please let me know and I'll try to look up an example.

I hope this helps some and answers the right question. If not or if there is anything else that I can do, please let me know.

Powered by Community Server, by Telligent Systems