Hi Dave,

Dave Brosius wrote:
> So, i'm inferring from all the responses here, that we ignore this Node
> n if:
>
>   if ((n instanceof Attr)
>   &&  ("xmlns".equals(n.getPrefix())
>     ||
> "http://www.w3.org/2001/XMLSchema-instance".equals(n.getNamespaceURI())))
>    continue;

During the validation process yes (although obviously not that exact code). Namespace attributes are magic things. They provide information about the what namespaces elements and attributes are in *during parse*. After parse you can do what you want with them and they have no effect on the namespace of other nodes. Since they just provide meta information about nodes you have effectively already defined what they mean in the schema when specifying what namespace your elements and attributes are in.

Cheers,

Gareth




----- Original Message ----- From: "Stanimir Stamenkov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 19, 2005 8:36 AM
Subject: Re: Nodes not represented by schema



/Dave Brosius/:

There are a few nodes that are never represented in a schema definition,
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
and
xsi:noNamespaceSchemaLocation="foo.xsd"
are two that come to mind.
The question is, how do we humans know this? Did we memorize some list of nodes, or did we learn
some rule to apply?


I guess we memorize them:

"3.2.7 Built-in Attribute Declarations" <http://www.w3.org/TR/xmlschema-1/#d0e3067>:

There are four attribute declarations present in every schema by definition:

Attribute Declaration for the 'type' attribute
...
Attribute Declaration for the 'nil' attribute
...
Attribute Declaration for the 'schemaLocation' attribute
...
Attribute Declaration for the 'noNamespaceSchemaLocation' attribute
...


--
Stanimir


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



-- Gareth Reakes, Managing Director Parthenon Computing +44-1865-811184 http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to