William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by Dan Drillich:
Jim,
Finally, the fourth attribute, attributeFormDefault, has the value unqualified. This means that the attributes described by this schema are not in a namespace."
Originally posted by Balaji Loganathan:
Balaji
As explained in Roger Slides, it will just act as a switch to hide or expose the namespace qualifiers in the instance document.
elementFormDefault="qualified" -
This is a directive to any instance documents which conform to this schema:
Any elements used by the instance document which were declared in this schema must be namespace qualified.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by Jayadev Pulaparty:
Is there any other way i can refer to the someotherElement without qualifying it with some:??
Hence coming back to full-circle, what is the relevance of the elementFormDefault.
All these things are totally mixed up in my head Anyone please clarify........
Originally posted by jim yin:
unqualified attributes are in the null namespace, rather than the default namespace. Does "null namespace" means "no namespace"?
[ September 10, 2002: Message edited by: jim yin ]
I was referring from this document http://www.xfront.com/HideVersusExpose.pdf
Now you can check against XML Bible.
A binary switch attribute in the schema is used to control the hiding/exposure of namespaces: by setting elementFormDefault="unqualified" the namespaces will be hidden (localized) within the schema, and by setting elementFormDefault="qualified" the namespaces will be exposed in instance documents.
The third attribute, elementFormDefault, has the value qualified. This means that the elements being described in this document are in fact in a namespace; specifically they're in the target namespace given previously by the targetNamespace attribute. This does not mean that the elements being modeled necessarily have prefixes, merely that they are in some namespace.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by Dan Drillich:
Balaji,
Cheers,
Dan
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by Dan Drillich:
[/QB]
Originally posted by jim yin:
unqualified attributes are in the null namespace, rather than the default namespace. Does "null namespace" means "no namespace"?
[ September 10, 2002: Message edited by: jim yin ]
Originally posted by Jayadev Pulaparty:
I guess the attributeFormDefault goes on similar lines to the elementFormDefault
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by Balaji Loganathan:
hi jim,
where did u got this lines,i'm afraid its not correct.want to check.
regards
balaji
...the default value for both is unqualified, which is why only globally declared elements and attributes need to be qualified in instance documents.
<?xml version="1.0"?>
<my:camera xmlns:my="http://www.camera.org"
xmlns:nikon="http://www.nikon.com"
xmlns entax="http://www.pentax.com"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="http://www.camera.org Camera.xsd">
<my:body>
<nikon escription>Ergonomically designed casing for easy handling</nikon escription>
</my:body>
<my:manual_adapter>
<pentax:speed>1/10,000 sec to 100 sec</pentax:speed>
</my:manual_adapter>
</my:camera>
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Originally posted by jim yin:
Please read p201-203. The explanation is not very clear.
Originally posted by Dan Drillich:
Guys,
It's even more complex.
I changed elementFormDefault to "qualified" in camera.xsd.
My correct xml instance (according to XML Spy) is -
Now body and manual_adapter are in the targetNamespace while nikon escription and pentax:speed retain their original namespace.
Fascinating!
Dan
Local attributes and element qualifiers can be hided or exposed by switching "unqualified"/"qualified" values for attributeformdefault,elementformdefault form
Originally posted by Jayadev Pulaparty:
Balaji,
My question is,
Why is the namespace information not extracted using xslt?
My xslt processor is Apache's xalan.
Please clarify.
Originally posted by jim yin:
For local attributes, we can use "unqalified" value to turn off the namespace reference, and "qualified" to turn it on.
Is this right?
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|