On Sun, 2002-06-23 at 12:17, Tom Bryan wrote:
> I'd like the roles to be validated by the XML parser, but the set of 
> valid roles varies depending upon which customer is using the software. 

Hmm. that can make things tricky.

> Is there a way to do this without having a completely different version of the 
> schema at each customer site?  Am I stuck with using xsd:string for the role 
> attribute and doing all of the validation in the code (driven by a 
> site-specific properties file)?  Would you somehow separate out the portions 
> that change per customer and let those responsible for installing the system 
> tweak the customer-specific portions of the schema?

I expect you'll need an xml schema per site if they don't all share the
same role information. One thing that could make this really do-able,
though, is the use of name spaces in your data,  like so:

<?xml version="1.0">
<roles xmlns:sitea="http://sitea.org/schema";
       xmlns:siteb="http://siteb.com/schema";
>
  <sitea:customerinfo>
      <sitea:customer name="foo"/>
          <sitea:info>DATA</sitea:info>
      </sites:customer>
  </sitea:customerinfo>
  <siteb:customerdata>
      <siteb:customer name="bar"/>
          <siteb:custinfo>DATA2</sitea:custinfo>
      </siteb:customerdata>
  </siteb:cusotmerdata>
</roles>

Each site has it's own name space, and can define their own schema as
needed. 

You probably aught to read the spec at
http://www.w3.org/TR/REC-xml-names/ for complete information.....

-- 
----------------------------------
--         Kevin Sonney         --
--  ICQ: 4855069  AIM: ksonney  --
----------------------------------
320C 0336 3BC4 13EC 4AEC  6AF2 525F CED7 7BB6 12C9
 Crispy Fries -- Neil, http://www.goats.com

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to