Hi folks,

I had couple of doubts regarding XML Schema Processing
processing.

1. When validation is turned on, does the
SchemaGrammer which is been loaded is the grammer
constructed from XML Schema or is it directly
constructed from XML Document without parsing XML
Schema.

2. Secondly I am assuming the SchemaGrammer is
constructed from XML Schema  defined in XML Document.
I am trying to gather information about all the
elements and attributes defined in Schema which are
also present in XML Document. Problem comes when I try
to collect information about attributes present from
XSModel instance obtained from ElementPSVI, it returns
no attribute information. Although both in Schema and
XML document the attributes are defined. below is code
snippet I am using to achieve this. Can anyone help me
out in figuring out the problem.

-----------------------------------------------------

ElementPSVI elementPSVI =
psviProvider.getElementPSVI();
XSModel xsmodel = elementPSVI.getSchemaInformation();

// This works fine for Element information

XSNamedMap xsMap =
xsmodel.getComponents(XSConstants.ELEMENT_DECLARATION);

for(int i = 0; i < xsMap.getLength(); i++){
    
    String name = xsMap.item(i).getName();
.
.
.
}

// But when try to get information about attributes 
// it does not get "any" attribute information

xsMap =
xsmodel.getComponents(XSConstants.ATTRIBUTE_DECLARATION);

for(int i = 0; i < xsMap.getLength(); i++){
            String name = xsMap.item(i).getName();
.
.
.
}
....

-----------------------------------------------------

Thanks for going through this and getting involved.

-Huzefa

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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

Reply via email to