|
|||||||
New to SitePoint Forums? Register here for free!
|
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: Aug 2004
Posts: 428
|
xml - create a validator with dtd or xsd - db concept of 2 primary keys
I am having a hard time generating a validator for an xml file which eventually it's attributes will go into a database.
Heres a simple example of where being able to set 2 primary keys in a db helps with. location="0" owner="0" location="0" owner="1" location="1" owner="0" location="1" owner="1" location="1" owner="1" - yeilds error as that SET (location and owner) already exists. How can i get a dtd or xsd file to validate my document in a similar way? So that a set is considered unique. - (and only when the set is a duplicate will i get warning when I call $dom->validate() ) Also how can i get the unique keys not only to be numbers but strings with odd characters like location="b/gh/" This data is basically a menu system on a website. Where the location can be the same but owned by a different user. Example: bob and dan have written an article about jane... to get to that article .. the url will look as follows: bob.asdf.com/jane/ dan.asdf.com/jane/ notice how setting 2 primary keys help differentiate between the data. Here is what i currently have. Any help/advice/ ect would be appreciated. PHP Code:
|
|
|
|
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 03:24.









Threaded Mode