Add UnattendJoin component to your Specialize pass, like so :
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Identification>
<Credentials>
<Domain>domain.com</Domain>
<Password>yourpassword</Password>
<Username>yourusername</Username>
</Credentials>
<JoinDomain>domain.com</JoinDomain>
<UnsecureJoin>false</UnsecureJoin>
</Identification>
</component>
This is for my own, x64 build. Ammend to x32 if your unattend is for a 32bit system.
Based on your post, it seems you have the Computer Name prompting all worked out. Be warned, I have not heard of Computer Name prompting and Domain Join to BOTH work using unattend.xml (you will see trust errors). You will need to chose which to include in the unattend, then script out the other to perform after mini-setup. If possible for your environment, you can have unattend.xml generate a semi-random name, AND Domain Join.
Setting the "RegisteredOwner" and/or "RegisteredOrganization", in conjunction with adding a * to the "ComputerName" are important for this to work.
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>true</CopyProfile>
<TimeZone>Central Standard Time</TimeZone>
<RegisteredOrganization>YourCompany</RegisteredOrganization>
<RegisteredOwner>Someone</RegisteredOwner>
<ShowWindowsLive>false</ShowWindowsLive>
<ComputerName>*</ComputerName>
</component>
Unattend.xml will pull 7 characters from the registered owner then the registered organization until there are 7 characters, then adds a dash and random characters to make a total of 15.
Example from above would "randomly" generate this computername:
someone-2618273 (random arrangement of numerals)
This WILL work along side the UnattenJoin component without errors.