For Programmers: Free Programming Magazines  


Home > Archive > Tcl > May 2007 > looking for tdom help in merging two schemas into one









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author looking for tdom help in merging two schemas into one
Bryan Oakley

2007-05-25, 7:09 pm

I've got two xml schemas which look something like:

<xs:schema xmlns:xs1="http://www.w3.org/2001/XMLSchema" ...>
...
</xs:schema>
<xs:schema xmlns:xs2="http://www.example.com" ...>
...
</xs:schema>

I'm wanting to take these two separate schemas and merge them into one,
so the result would be:

<xs:schema xmlns:xs1="..." xmlns:xs2="..." ...>
...
...
</xs:schema>

So my question is, how can I pull out the namespace definitions from
each of the separate schemas? I can do "$root attributes" but what it
returns doesn't have all the information I want.

Do I even need to do this step or is there a tdom command I'm missing
that can merge these two schemas into one in one fell swoop?

I'm tempted just to use string commands to pull that stuff out, but
surely there must be a way to take advantage of tdom to do the work.

--
Bryan Oakley
http://www.tclscripting.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com