Doc for 'href=' and 'id=' clauses?

Doc for 'href=' and 'id=' clauses?

Post by Karsten Grau » Sat, 26 Jan 2002 17:51:40



Hello all,

i have to write a XML parser. It have also to handle the 'href=' and 'id='
attributes. Now i searched for the specs of this XML attributes (nothing to
do with HTML), but i can't find anything on w3c.org.

Where could i find some information how to handle this attributes pair?

e.g.should the attributes of the both tags wich are connected by 'id' and
'href' be merged? Or does 'href' just define a link to the >data< of the tag
wich has the corresponding 'id' attribut?

Thanks in advance,

Karsten Graul.

 
 
 

Doc for 'href=' and 'id=' clauses?

Post by Johannes Koc » Sat, 26 Jan 2002 18:38:08



> Hello all,

> i have to write a XML parser. It have also to handle the 'href=' and 'id='
> attributes. Now i searched for the specs of this XML attributes (nothing to
> do with HTML), but i can't find anything on w3c.org.

Which XML based language do you use? Read the specification for this
particular XML application. XML itself does not define href or id
attributes.

--
Johannes Koch     http://waldbaer.home.pages.de/
In te domine speravi, non confundar in aeternum.
                        (from Te Deum, 4th cent.)

 
 
 

Doc for 'href=' and 'id=' clauses?

Post by Sascha Kerschhofe » Sat, 26 Jan 2002 18:59:52


As far as I know, on criterion of beeing "wellformed" the value of the id
attribute has to be unique. I wonder if unique within the node set or within the
whole document? Does anyone know?

Sascha

Karsten Graul schrieb:

> Hello all,

> i have to write a XML parser. It have also to handle the 'href=' and 'id='
> attributes. Now i searched for the specs of this XML attributes (nothing to
> do with HTML), but i can't find anything on w3c.org.

> Where could i find some information how to handle this attributes pair?

> e.g.should the attributes of the both tags wich are connected by 'id' and
> 'href' be merged? Or does 'href' just define a link to the >data< of the tag
> wich has the corresponding 'id' attribut?

> Thanks in advance,

> Karsten Graul.


 
 
 

Doc for 'href=' and 'id=' clauses?

Post by Julian F. Reschk » Sat, 26 Jan 2002 19:29:36


This has nothing to do with wellformedness.

ID validation requires that the document has a DTD and the parser is in
validating mode (otherwise it won't know that something has the type ID).



> As far as I know, on criterion of beeing "wellformed" the value of the id
> attribute has to be unique. I wonder if unique within the node set or
within the
> whole document? Does anyone know?

> Sascha

> Karsten Graul schrieb:

> > Hello all,

> > i have to write a XML parser. It have also to handle the 'href=' and
'id='
> > attributes. Now i searched for the specs of this XML attributes (nothing
to
> > do with HTML), but i can't find anything on w3c.org.

> > Where could i find some information how to handle this attributes pair?

> > e.g.should the attributes of the both tags wich are connected by 'id'
and
> > 'href' be merged? Or does 'href' just define a link to the >data< of the
tag
> > wich has the corresponding 'id' attribut?

> > Thanks in advance,

> > Karsten Graul.


 
 
 

Doc for 'href=' and 'id=' clauses?

Post by Johannes Koc » Sat, 26 Jan 2002 19:29:18



> As far as I know, on criterion of beeing "wellformed" the value of the id
> attribute has to be unique. I wonder if unique within the node set or within the
> whole document? Does anyone know?

If the id attribute is of type ID, the value must be unique within the
document. This is a validity constraint, not a wellformedness constraint.

--
Johannes Koch     http://waldbaer.home.pages.de/
In te domine speravi, non confundar in aeternum.
                        (from Te Deum, 4th cent.)

 
 
 

Doc for 'href=' and 'id=' clauses?

Post by Peter Flyn » Sun, 27 Jan 2002 09:35:20



> As far as I know, on criterion of beeing "wellformed" the value of the id
> attribute has to be unique.

No, only if the document is to be valid, and only if the attribute
**type** is "ID". The **name** of the attribute can be anything.

In well-formed-only document, all attributes are of type CDATA, so
there is no test for uniqueness.

Quote:> I wonder if unique within the node set or within the
> whole document?

Within the document.

Quote:> Does anyone know?

Everybody should: it's in the XML Specification as a validity check on
Production 52.

///Peter