If there are no "txinwitness" blocks, then none of the inputs being used are "SegWit" inputs... therefore, it isn't a SegWit "transaction"... or more correctly, it doesn't contain any SegWit data.
An example:
bitcoin-cli getrawtransaction 2d531f2d4bf1227a6492656b4b340d36c810d313d94a413a965524ae71086bb9 1
Returns:
{
"txid": "2d531f2d4bf1227a6492656b4b340d36c810d313d94a413a965524ae71086bb9",
"hash": "157d1c3bf4860855a6f98792d459f83ad3bd8844cf729c8d9a6ec3accc5e2d7f",
"version": 2,
"size": 290,
"vsize": 263,
"locktime": 0,
"vin": [
{
"coinbase": "039b4208045c2b9b5b642f4254432e434f4d2ffabe6d6d91102119a0522dda683a998f05620ba4beb1f5372a04689d07d47a291dbd25c20100000000000000653f93327a0200fd00000000",
"sequence": 4294967295
}
],
"vout": [
{
"value": 12.50253935,
"n": 0,
"scriptPubKey": {
"asm": "0 97cfc76442fe717f2a3f0cc9c175f7561b661997",
"hex": "001497cfc76442fe717f2a3f0cc9c175f7561b661997",
"reqSigs": 1,
"type": "witness_v0_keyhash",
"addresses": [
"bc1qjl8uwezzlech723lpnyuza0h2cdkvxvh54v3dn"
]
}
},
{
"value": 0.00000000,
"n": 1,
"scriptPubKey": {
"asm": "OP_RETURN aa21a9ed1892392fc479aa2479df651f83a83c625ae23d35876a9fac6d9c617c8d602d9f",
"hex": "6a24aa21a9ed1892392fc479aa2479df651f83a83c625ae23d35876a9fac6d9c617c8d602d9f",
"type": "nulldata"
}
},
{
"value": 0.00000000,
"n": 2,
"scriptPubKey": {
"asm": "2 3 [error]",
"hex": "52534b424c4f434b3ad1087f5ba5c0e6d2c0ebe90d2ef35033860dfa99aec1afe04dfd11fa70ebd1a2",
"type": "nonstandard"
}
}
],
"hex": "020000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff4b039b4208045c2b9b5b642f4254432e434f4d2ffabe6d6d91102119a0522dda683a998f05620ba4beb1f5372a04689d07d47a291dbd25c20100000000000000653f93327a0200fd00000000ffffffff036f5c854a0000000016001497cfc76442fe717f2a3f0cc9c175f7561b6619970000000000000000266a24aa21a9ed1892392fc479aa2479df651f83a83c625ae23d35876a9fac6d9c617c8d602d9f00000000000000002952534b424c4f434b3ad1087f5ba5c0e6d2c0ebe90d2ef35033860dfa99aec1afe04dfd11fa70ebd1a20120000000000000000000000000000000000000000000000000000000000000000000000000",
"blockhash": "0000000000000000000b616cd42f140420d47544464ea9e59f72ff4d124f903a",
"confirmations": 48,
"time": 1536895846,
"blocktime": 1536895846
}
Note: the vout-part mentions a type of "witness_v0_keyhash".
I'm not sure if this should be counted as a "Segwit transaction" or not. I guess it all comes down to the question if a coinbase transaction always counts as a non-segwit input or not.
Any feedback is welcome!