beginner: small and simpel example from book not working - XML SOAP
This is a discussion on beginner: small and simpel example from book not working - XML SOAP ; hello,
i am trying to learn xml.
in the book i use there is an example that you can see below.
the example is not working but i do not understand why.
i get an error that says : ' ...
-
beginner: small and simpel example from book not working
hello,
i am trying to learn xml.
in the book i use there is an example that you can see below.
the example is not working but i do not understand why.
i get an error that says : ' Verwijzing naar niet nader omschreven item
footer'.
this means roughly (i hope): it points to an not declared item footer.
thanks
henri osewoudt
------------------------- source code -------------------------
<?xml version="1.0" standalone="yes"?>
<family>
<title>my family</title>
<parent role="mother">judy></parent>
<parent role="father">layard</parent>
<child role="daughter">jennifer</child>
<image source="JENN" />
<child role="son">brendan</child>
&footer;
</family>
<!DOCTYPE family [
<!ELEMENT title (#PCDATA)>
<!ELEMENT parent(#PCDATA)>
<!ATTLIST parent role (mother | father) #REQUIRED>
<!ELEMENT child (#PCDATA)>
<!ATTLIST child role (daughter | son) #REQUIRED>
<!NOTATION gif system "image/gif">
<!ENTITY JENN system "http://images.about.com/sites/guidepics/html.gif"
NDATA gif>
<!ELEMENT image empty>
<!ATTLIST image source entity #REQUIRED>
<!ENTITY footer "Brought to you by jennifer">
]>
-------------------------------------------------------------------------
-
Re: beginner: small and simpel example from book not working
"Osewoudt" <oswwoudt@ufo.org> wrote in message
news:460e7e16$0$30727$ba620dc5@text.nova.planet.nl...
> hello,
>
> i am trying to learn xml.
> in the book i use there is an example that you can see below.
>
> the example is not working but i do not understand why.
>
> i get an error that says : ' Verwijzing naar niet nader omschreven item
> footer'.
>
> this means roughly (i hope): it points to an not declared item footer.
>
> thanks
>
> henri osewoudt
> ------------------------- source code -------------------------
>
> <?xml version="1.0" standalone="yes"?>
> <family>
> <title>my family</title>
> <parent role="mother">judy></parent>
> <parent role="father">layard</parent>
> <child role="daughter">jennifer</child>
> <image source="JENN" />
> <child role="son">brendan</child>
> &footer;
> </family>
>
>
>
> <!DOCTYPE family [
> <!ELEMENT title (#PCDATA)>
> <!ELEMENT parent(#PCDATA)>
> <!ATTLIST parent role (mother | father) #REQUIRED>
> <!ELEMENT child (#PCDATA)>
> <!ATTLIST child role (daughter | son) #REQUIRED>
> <!NOTATION gif system "image/gif">
> <!ENTITY JENN system "http://images.about.com/sites/guidepics/html.gif"
> NDATA gif>
> <!ELEMENT image empty>
> <!ATTLIST image source entity #REQUIRED>
> <!ENTITY footer "Brought to you by jennifer">
> ]>
>
> -------------------------------------------------------------------------
>
>
For the file to be valid then the DTD needs to be associated with it
somehow, otherwise you have an undeclared entity reference, & f o o t e r ;.
How do you tell the XML to use the DTD? If you place the DTD before the XML
content, after the declaration then you will have to address a number of
issues with it such as the NOTATION.
--
Joe Fawcett (MVP - XML)
http://joe.fawcett.name
Similar Threads
-
By Application Development in forum PHP
Replies: 0
Last Post: 07-14-2007, 08:18 PM
-
By Application Development in forum C
Replies: 6
Last Post: 06-12-2005, 04:24 PM
-
By Application Development in forum basic.visual
Replies: 0
Last Post: 08-28-2004, 03:52 PM
-
By Application Development in forum basic.visual
Replies: 8
Last Post: 03-03-2004, 12:07 AM
-
By Application Development in forum basic.visual
Replies: 0
Last Post: 03-02-2004, 09:09 PM