Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML, XSL, XSD, and Web Services (Complicated)

Status
Not open for further replies.

flanakin

Programmer
Mar 21, 2000
158
US
I'm implementing a web service for the first time and everything went smoothly. It was beautiful.

Then, when I wanted to put the meat and potatoes into the service, I had to create a schema document for the first time. Now, I've done DTD's and the XSD wasn't really that hard. I wanted to do an automatic code generation thing available in Visual Studio .NET, so, for some reason it wasn't accepting my XSD. That was a pain, but after hours of playing with it, it finally worked. Now, with this, I had to specify the XSD file in the XML file. Once I did this, the other pages that I had referring to the XML file will not work. So, as of right now, my XSL cannot traverse my XML model. I can see that there is an element at the root, but for some reason, when I access it directly, nothing happens. I know how the XMLNS property works - allows you to specify a namespace for tags - so I'm thinking that when my XSL is being processed there is some sort of namespace-specifier that I must use. I just have no idea what that would be.

Please feel free to ask for clarification, I don't think I did a good job of explaining everything.

Here is what my XML looks like:
<calendar xmlns=&quot;...
</calendar>

I know for a fact that it's the XMLNS attribute that's causing the problem because I have taken everything else out and it works fine. There are also &quot;xmlns:xsi&quot; and &quot;xsi:????&quot; attributes, but I can't remember what they are off the top of my head.

I appreciate any help that can be given! Thanks. ________________________________________
Michael C Flanakin
Indigo Web Systems
michael.flanakin@indigows.com
 
Sounds like you're doing the right thing, but you seem to be having trouble spotting where your XML documents don't match the XSD you created. The VS.NET IDE isn't very good at that sort of thing. Try XMLSpy (you can get a 30-day trial) from it's much more user-friendly.

Chip H.
 
VS does a fine job with validating the XSD, that's not the problem.

After researching it, the only solution seems to be applying an explicit namespace prefix within the XML and XSL files. They don't have to be the same, but the declaration MUST be there. In my opinion, this is rediculous. I could deal with having a default namespace (w/ no prefix), but when I am forced to specify a prefix, that is stupid.

If anyone else knows of a better solution, I would greatly appreciate it. Until then, !@#%*!... ________________________________________
Michael C Flanakin
Indigo Web Systems
michael.flanakin@indigows.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top