Here is an example of the XQuery output that I get:
<clinic>
<Name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Healthy Kids Pediatrics</Name>
<Address xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">510 W 27th St, Los Angeles, CA 90007</Address>
<PhoneNumberList>213-555-5845</PhoneNumberList>
<NumberOfPatientGroups>2</NumberOfPatientGroups>
</clinic>
As you can see, in the <Name>
and <Address>
tag, there are these strange xmlns:xsi tags being added to it.
The funny thing is if I go to the top of my xml file, and remove:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="vaccination.xsl"?>
<Vaccination xsi:noNamespaceSchemaLocation="vaccination.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
the phrase
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Then now my XQuery XML output will look like this (which is what I want)
<clinic>
<Name>Healthy Kids Pediatrics</Name>
<Address>510 W 27th St, Los Angeles, CA 90007</Address>
<PhoneNumberList>213-555-5845</PhoneNumberList>
<NumberOfPatientGroups>2</NumberOfPatientGroups>
</clinic>
BUT, when I view my XML in my browser, it will give an error and display something like:
XML Parsing Error: prefix not bound to a namespace
Location: file:///C:/Users/Pac/Desktop/csci585-hw3/vaccination.xml
Line Number 3, Column 1:<Vaccination xsi:noNamespaceSchemaLocation="vaccination.xsd">
^
Does anyone have an idea of how to remove those xsi tags from my XQuery output without breaking my XML/XSL ?