Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: ID and IDREF Files

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 12/2/2007 5:00:00 PM

geoff wrote:
> This is how the book has the files (3 of them) but xml notepad says shipTo 
> has to be filled out, I hate it when book examples do not work :(
> 
> 
> ======== INVOICE.XML ==========
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <invoice:invoice xmlns:invoice="http://www.skatestown.com/ns/invoice"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://www.skatestown.com/ns/invoice
>                        ./invoice.xsd"
>    id="43871" submitted="2004-01-05" customerId="73852">
>    <billTo id="addr-1">
>       <company>The Skateboard Warehouse</company>
>       <street>One Warehouse Park</street>
>       <street>Building 17</street>
>       <city>Boston</city>
>       <state>MA</state>
>       <postalCode>01775</postalCode>
>    </billTo>
>    <shipTo href="addr-1"/>


shipTo is defined here

>  <xsd:complexType name="invoiceType">
>   <xsd:sequence>
>    <xsd:element name="billTo" type="po:addressType" />
>    <xsd:element name="shipTo" type="po:addressType" />
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
as being of type po:addressType and that is defined here

>  <xsd:complexType name="addressType">
>   <xsd:sequence>
>    <xsd:element name="name" type="xsd:string" minOccurs="0" />
>    <xsd:element name="company" type="xsd:string" minOccurs="0" />
>    <xsd:element name="street" type="xsd:string" maxOccurs="unbounded" />
>    <xsd:element name="city" type="xsd:string" />
>    <xsd:element name="state" type="xsd:string" minOccurs="0" />
>    <xsd:element name="postalCode" type="xsd:string" minOccurs="0" />
>    <xsd:element name="country" type="xsd:string" minOccurs="0" />
>   </xsd:sequence>
>   <xsd:attribute name="id" type="xsd:ID" />
>   <xsd:attribute name="href" type="xsd:IDREF" />
>  </xsd:complexType>

It has mandatory child elements like street and city.

As said in my reply to your first post, IDREF does not mean that the 
referenced element is included.


-- 

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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent