First i would like to say that the "SchemaLocation" attribute is decribed as 'being a hint'. There is nothing in the specification that forces the resolution of that attribute in XML parsers.
That said, if you are using a file based approach, the way to define 'in the same location' would be schemaLocation=".\main.xsd".
However, wether this will work or not depends on the specific implementation of the XML parser you are using.
If you are using .Net i would like to advise you to load both schemas into a XmlSchemaSet. This will be sufficient to validate/code-gen items using that schema set. The resolution is then done on namespace-uri.
If you are using .Net you can also attach a XmlResolver to your application that takes over the resolution of these items.
Have a look at MSDN for more details about this approach
Hope this helps,