---
Product: Aspose.Words
Platform: python
Page Type: reference
Canonical URL: https://reference.aspose.org/words/python/stylechainresolver
---

# StyleChainResolver

## Overview

`StyleChainResolver` is a class in Aspose.Words FOSS for Python.

Walk the ``<w:basedOn>`` graph for a styleId.

This class declares 3 methods for StyleChainResolver objects in Python programs.
Available methods include: `__init__`, `chain`, `numPr_from_style`.
Public members are accessible to any Python application after installing the Aspose.Words FOSS for Python package.

## Methods

| Signature | Description |
|-----------|-------------|
| `__init__(ctx: ReaderContext)` | Calls __init__(ctx) on this StyleChainResolver instance. |
| `chain(style_id_or_name: str)` → `list[str]` | Returns the inheritance chain of a style, allowing developers to resolve based‑on relationships |
| `numPr_from_style(style_id: str)` → `Optional[ET.Element]` | Find the first ``<w:numPr>`` while walking the chain back to root. |

## See Also

- [Aspose.Words for Python — Enterprise API Reference](https://reference.aspose.com/words/python-net/)