dcsimg
www.webdeveloper.com
Results 1 to 1 of 1

Thread: XML Attributes in XSD: Either, Neither, but not both

  1. #1
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,816

    XML Attributes in XSD: Either, Neither, but not both

    So, here's something I've been trying to set up in XSD: the following code is green when valid, red when not.

    Code:
    <Picture id="PicId"></Picture>
    <Picture id="PicId" series="SeriesID"></Picture>
    <Picture id="PicId" set="SetID"></Picture>
    <Picture id="PicId" series="SeriesID" set="SetID"></Picture>
    The pictures in question can be part of a series (to be viewed in a specific order), part of a set (to be viewed in any order), stand-alone images, but NOT part of a series AND set. How would you do this?

    Or do I need to simply throw in a personal warning via PHP (which parses the XML)?
    Last edited by Mr Initial Man; 04-16-2017 at 07:06 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center