Hi:
I -have- done a custom XML tagset that conforms to a schema. But I did it by READING the schema and building the tagset events manually.
In other words, every REGION, should get the <REG> tag and every subsidiary gets the <SUB> tag:
[pre]
<Asia>
<SUB>Tokyo</SUB>
</Asia>
<Asia>
<SUB>Kyoto</SUB>
</Asia>
<Canada>
<SUB>Montreal</SUB>
</Canada>
[/pre]
I believe they're working on the ability to use an XMLMAP for both INPUT (available in SAS 8, SAS 9.1.3, SAS 9.2) and OUTPUT (I thought this was available for SAS 9.2). What I don't know is whether the XMLMAP application will read the schema for you and derive the correct tags. You may still need an XMLMAP for this. That would certainly make the job easier.
But as I said, I have successfully written a custom tagset template to produce XML without having an XMLMAP, but just by reading the Schema (and having a sample of what the VALID final file should look like). Of course, reading the Schema is not as helpful as having the sample VALID output. Then I mapped (manually) the variables to the XML. Then I wrote my own custom tagset template with custom events.
The type of tagset template I wrote depended on whether I was going to use the SAS XML LIBNAME engine (fewer events to contend with) versus ODS (more events to contend with).
However, it -is- possible. For some custom XML examples created for use with the SAS XML Libname engine, see this paper:
http://www.lexjansen.com/pharmasug/2006/technicaltechniques/tt24.pdf
I can send you a zip file of the programs used in this paper (the zip file may be out on the lexjansen.com site -- so check there first). But if you can't find the zip file, you can email me at the email address in the paper and I will send it to you.
cynthia