1. Overview of the Standards
The Pipe‑Tobacco XML Standards consist of three complementary formats:
- Pipe Tobacco Review Standard: Comprehensive format for detailed tobacco reviews with extensive rating criteria
- Tobacco Inventory Standard: Streamlined format for cataloging and managing pipe tobacco collections
- Pipe Inventory Standard: Detailed format for cataloging pipe collections with specifications, dimensions, and materials
Standard | Root Element | Namespace | Version | Schema File | Purpose |
---|---|---|---|---|---|
Review | <Review> |
http://example.org/pipe-review |
version="1.0" |
pipe-review.xsd |
Detailed tobacco reviews with ratings |
Tobacco Inventory | <Tobacco> |
http://example.org/tobacco |
version="1.0" |
tobacco.xsd |
Tobacco collection cataloging and management |
Pipe Inventory | <Pipe> |
http://example.org/pipe |
version="1.0" |
pipe.xsd |
Pipe collection cataloging with specifications |
Key Design Principles:
- All standards use consistent
MultiSelectItem
patterns for repeatable fields - Review and Tobacco standards share
RatingType
(1‑5 scale) for consistency - All elements are optional except where explicitly noted
- Version attributes enable future extensions
- Nested complex types (Pipe standard) provide logical data grouping
2. Pipe Tobacco Review Standard
2.1 Core Elements
The table below lists every element that appears directly under <Review>
. All are xs:string
unless noted otherwise.
Element | Type | Required? | Description |
---|---|---|---|
CreatedDate | xs:date | Yes | ISO‑8601 date (YYYY‑MM‑DD) when the review was written. |
ParentBrand | xs:string | No | Corporate owner of the tobacco brand. |
Brand | xs:string | No | Commercial brand name. |
Blend | xs:string | No | Blend description (e.g., "Virginia/Latakia"). |
Content | MultiSelectItem | No, repeatable | Leaf‑tobacco types (Virginia, Burley, …). |
Flavoring | MultiSelectItem | No, repeatable | Added flavorings (Cherry, Vanilla, …). |
Source | xs:string | No | Where the tobacco was obtained. |
TobaccoCut | MultiSelectItem | No, repeatable | Cut style(s) – Fine, Medium, Coarse. |
AgeOfTobacco | xs:string | No | Human‑readable age (e.g., "6 months"). |
WeatherOnDay | xs:string | No | Weather during the session. |
PipeUsed | xs:string | No | Pipe model. |
PipeShape | xs:string | No | Shape descriptor (Bent, Straight, …). |
2.2 Rating Elements (1‑5)
All rating elements are of type RatingType
, an integer restricted to the range 1‑5.
Element | Meaning |
---|---|
PowerOrIntensity | Overall strength/power of the blend. |
Depth | Perceived depth of flavor. |
Complexity | Number of distinct notes. |
BalanceOfFlavors | Harmony among flavors. |
Strength | Nicotine / mouth‑feel intensity. |
Smoothness | Harshness vs. smoothness. |
Finesse | Subtlety of the smoke. |
Richness | Body and fullness. |
Sweetness | Presence of sweet notes. |
PleasantFruit | Fruitiness. |
PleasantSpice | Spiciness. |
PleasantTang | Tangy / acidic notes. |
PleasantUmami | Savory / umami quality. |
HighPointOfBowl | Quality of the high point of the bowl. |
LowPointOfBowl | Quality of the low point of the bowl. |
BurnsCool | How cool the burn stays. |
SufficientlyDry | Dryness of the smoke. |
TinAroma | Aroma when the tin is opened. |
SidestreamAroma | Aroma of the sidestream smoke. |
RoomNote | Overall room note after smoking. |
Two additional elements close the review:
<Comments>
– free‑form reviewer notes (preserve whitespace).<FinalRating>
– overall rating, usually the average of the individual scores.
2.3 Data‑Type Details
Type | Definition | Constraints |
---|---|---|
xs:date | ISO‑8601 calendar date. | Must be a valid Gregorian date (YYYY‑MM‑DD). |
RatingType | Simple integer restriction. | minInclusive = 1, maxInclusive = 5. |
MultiSelectItem | Unrestricted string. | Intended for repeatable selections (e.g., multiple <Content> entries). |
xs:string | Unicode text. | No length limit, but keep it reasonable for readability. |
2.4 Repeating Elements
Elements that may appear zero or more times are declared with maxOccurs="unbounded"
in the XSD:
<xs:element name="Content" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Flavoring" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="TobaccoCut" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
Usage example:
<Content>Virginia</Content>
<Content>Burley</Content>
<Content>Latakia</Content>
2.5 Optional vs. Required
- Required: Only
CreatedDate
is mandatory (minOccurs="1"
). - Optional: Every other element has
minOccurs="0"
; you may omit it if the information isn't known.
Best practice: Include as many fields as you have reliable data; the schema will still validate a sparse review.
3. Tobacco Inventory Standard
This standard is designed for cataloging pipe tobacco collections, tracking storage, dates, and inventory status. It's perfect for building cellar management systems.
3.1 Core Elements
The table below lists every element that appears directly under <Tobacco>
.
Element | Type | Required? | Description |
---|---|---|---|
ParentBrand | xs:string | No | Corporate owner of the tobacco brand (e.g., "STG"). |
Brand | xs:string | No | Commercial brand name (e.g., "MacBaren"). |
Blend | xs:string | No | Specific blend name (e.g., "Plumcake Navy Blend"). |
Country | xs:string | No | Country of manufacture (e.g., "Denmark"). |
BlendType | MultiSelectItem | No, repeatable | Blend style(s) – Aromatic, English, Navy Blend, etc. |
Contents | MultiSelectItem | No, repeatable | Tobacco leaf types (Virginia, Burley, Latakia, etc.). |
Flavoring | MultiSelectItem | No, repeatable | Added flavorings (Rum, Cherry, etc.). |
Weight | xs:string | No | Total weight (e.g., "3.5 oz", "50g"). |
StorageType | xs:string | No | Packaging type (Tin, Pouch, Jar, Bulk). |
StorageQty | xs:integer | No | Number of storage units (e.g., 1 for one tin). |
SerialNumber | xs:string | No | UPC/barcode or batch number. |
BlendedBy | xs:string | No | Actual blender/manufacturer. |
Cut | MultiSelectItem | No, repeatable | Cut style(s) – Ribbon, Flake, Shag, etc. |
PurchaseDate | xs:string | No | Date purchased (MM/DD/YYYY format). |
ManufactureDate | xs:string | No | Date manufactured (MM/DD/YYYY format). |
Status | xs:string | No | Current status (Cellared, Opened, Consumed). |
Notes | xs:string | No | Any additional notes or observations. |
Rating | RatingType | No | Personal rating (1‑5). |
3.2 Data‑Type Details
The Tobacco standard uses the same core data types as the Review standard, with one addition:
Type | Definition | Constraints | Usage |
---|---|---|---|
xs:string | Unicode text. | No length limit. | Most inventory fields (dates as strings). |
xs:integer | Whole number. | Positive integers only. | StorageQty (number of units). |
RatingType | Simple integer restriction. | minInclusive = 1, maxInclusive = 5. | Personal rating. |
MultiSelectItem | Unrestricted string. | None. | Repeatable selections (BlendType, Contents, etc.). |
Note on Dates: Unlike the Review standard, inventory dates use human-readable string format (MM/DD/YYYY) rather than ISO‑8601, making them more intuitive for cellar tracking.
3.3 Repeating Elements
The Tobacco standard supports four repeatable element types for multi‑select fields:
<xs:element name="BlendType" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Contents" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Flavoring" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Cut" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
Usage example for a complex blend:
<BlendType>Navy Blend</BlendType>
<BlendType>Aromatic</BlendType>
<Contents>Black Cavendish</Contents>
<Contents>Burley</Contents>
<Contents>Latakia</Contents>
<Contents>Virginia</Contents>
<Flavoring>Rum</Flavoring>
3.4 Optional vs. Required
- All Optional: Every element has
minOccurs="0"
. You can create valid tobacco records with just the brand and blend name. - Best Practice: Start with basic identification (Brand, Blend) and add details as they become available.
Inventory Philosophy: The standard is designed to be forgiving – you can quickly add new tobaccos to your cellar and fill in details later as you open and smoke them.
4. Pipe Inventory Standard
This standard is designed for cataloging pipe collections with detailed specifications including materials, dimensions, provenance, and condition tracking. It's perfect for building comprehensive pipe collection management systems.
4.1 Core Elements
The table below lists every element that appears directly under <Pipe>
. Complex types are noted.
Element | Type | Required? | Description |
---|---|---|---|
Brand | xs:string | No | Commercial brand name (e.g., "J. Mouton Pipes"). |
PipeCarver | xs:string | No | Individual pipe maker/craftsman. |
Model | xs:string | No | Specific model name (e.g., "Calabash with Removable Top"). |
ModelNumber | xs:string | No | Manufacturer's model or grade number. |
MarkingStamping | xs:string | No | Engraved markings on the pipe. |
Shape | xs:string | No | Pipe shape classification (Calabash, Billiard, Dublin, etc.). |
StemMaterial | MultiSelectItem | No, repeatable | Stem material(s) – Ebonite, Vulcanite, Acrylic, etc. |
Accent | MultiSelectItem | No, repeatable | Accent materials (Silver, Gold, Wood, none). |
PipeMaterial | MultiSelectItem | No, repeatable | Bowl/stem materials – Briar, Meerschaum, Bamboo, etc. |
PipeFinish | xs:string | No | Surface finish – Smooth, Rustic, Sandblasted, Carved. |
StemType | xs:string | No | Stem bit type – Fishtail, Tapered, Saddle, etc. |
CountryOfOrigin | xs:string | No | Country where pipe was made (US, Denmark, UK, etc.). |
DatePipeMade | xs:string | No | Date pipe was crafted (MM-DD-YYYY format). |
DatePipePurchased | xs:string | No | Date pipe was acquired (MM-DD-YYYY format). |
Source | xs:string | No | Where pipe was purchased (Pipe Show, Retail, etc.). |
Price | PriceType | No | Purchase price as decimal (currency not specified). |
Dimensions | DimensionsType | No | Nested complex type containing all measurements. |
Notes | NotesType | No | Nested complex type containing pipe notes and status. |
4.2 Data‑Type Details
The Pipe standard introduces specialized types for measurements and pricing:
Type | Definition | Constraints | Usage |
---|---|---|---|
xs:string | Unicode text. | No length limit. | Most descriptive fields (dates as strings). |
MultiSelectItem | Unrestricted string. | None. | Repeatable material selections (StemMaterial, PipeMaterial, etc.). |
PriceType | Decimal restriction. | minInclusive = 0. | Purchase price (currency not specified). |
DimensionsType | Complex type. | All fields optional. | Nested measurements with units preserved. |
NotesType | Complex type. | All fields optional. | Nested notes and status information. |
Note on Dates: Pipe dates use human-readable string format (MM-DD-YYYY) for consistency with the Tobacco standard.
Note on Dimensions: All measurements are stored as strings to preserve units (inches, mm, grams, etc.).
4.3 Complex Types
The Pipe standard uses two nested complex types for logical data grouping:
4.3.1 DimensionsType
Groups all pipe measurements:
Element | Type | Description |
---|---|---|
PipeLength | xs:string | Total length from bit to bowl end (e.g., "5.25 in"). |
BowlHeight | xs:string | Height from base to rim (e.g., "6 in"). |
OutsideDiameter | xs:string | Widest bowl diameter (e.g., "1.5 in"). |
ChamberDiameter | xs:string | Internal bowl diameter (e.g., ".75 in"). |
ChamberDepth | xs:string | Internal bowl depth (e.g., "1.25 in"). |
Weight | xs:string | Total pipe weight (e.g., "2.1 oz"). |
4.3.2 NotesType
Groups pipe condition and usage information:
Element | Type | Description |
---|---|---|
DedicatedTo | xs:string | Tobacco type this pipe is dedicated to (e.g., "English"). |
Status | xs:string | Current condition (Resting, Active, Retired, etc.). |
Notes | xs:string | Additional observations or maintenance notes. |
Usage Example:
<Dimensions>
<PipeLength>5.25 in</PipeLength>
<BowlHeight>6 in</BowlHeight>
<ChamberDiameter>.75 in</ChamberDiameter>
<ChamberDepth>1.25 in</ChamberDepth>
</Dimensions>
<Notes>
<DedicatedTo>English</DedicatedTo>
<Status>Resting</Status>
<Notes>Briar, Bamboo Root shank, Teflon, Kevlar Rubber</Notes>
</Notes>
4.4 Repeating Elements
The Pipe standard supports three repeatable element types for multi-material pipes:
<xs:element name="StemMaterial" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Accent" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="PipeMaterial" type="MultiSelectItem"
minOccurs="0" maxOccurs="unbounded"/>
Usage example for a composite pipe:
<PipeMaterial>Briar</PipeMaterial>
<PipeMaterial>Bamboo</PipeMaterial>
<StemMaterial>Ebonite</StemMaterial>
<Accent>Silver</Accent>
<Accent>Wood</Accent>
Design Note: This allows for complex pipe constructions with multiple materials while maintaining clear structure.
4.5 Optional vs. Required
- All Optional: Every element and complex type has
minOccurs="0"
. You can create valid pipe records with just the brand and model. - Best Practice: Start with basic identification (Brand, Model, Shape) and add detailed specifications as they become available.
- Complex Type Flexibility: Within
Dimensions
andNotes
, all fields are optional, allowing partial measurement data.
Collection Philosophy: The standard supports both quick cataloging of new acquisitions and detailed documentation of prized pieces.
5. Validation Workflow
All three standards follow the same validation approach:
# For Review Standard:
xmllint --noout --schema pipe-review.xsd review.xml
# For Tobacco Standard:
xmllint --noout --schema tobacco.xsd tobacco.xml
# For Pipe Standard:
xmllint --noout --schema pipe.xsd pipe.xml
# All return "valid" or print detailed errors with line numbers.
IDE Support: Most modern editors (VS Code, IntelliJ, Eclipse) support XSD association and real-time validation. Simply add this to your XML file:
<?xml-model href="pipe-review.xsd" type="application/xml"
schemalocation="http://example.org/pipe-review pipe-review.xsd"?>
Replace pipe-review.xsd
with tobacco.xsd
or pipe.xsd
for the appropriate standard.
6. Extending the Standards
All three standards are designed to be extensible. Follow these steps for each:
- Define New Types: Add enumerations or restrictions (e.g.,
ShapeType
for standardized pipe shapes). - Insert Elements: Add new elements in the logical position within the
xs:sequence
. - Set Cardinality: Use
minOccurs="0"
for optional,maxOccurs="unbounded"
for repeatable. - Update Documentation: Document the new field and bump the version (e.g., 1.1).
Example Extensions:
- Tobacco:
<StorageLocation>
and<StorageTemperature>
- Pipe:
<ConditionGrade>
and<FilterType>
- Review:
<PairingNotes>
for beverage pairings
Place new elements in logical sequence order to maintain data flow.
7. Practical Tips & Gotchas
Issue | Standard | What to Watch For | Remedy |
---|---|---|---|
Wrong namespace | All | Forgetting the default namespace on root element. | Ensure proper xmlns declaration on <Review> , <Tobacco> , or <Pipe> . |
Date format | Review | Using MM/DD/YYYY instead of ISO‑8601. | Review standard requires YYYY‑MM‑DD; Tobacco/Pipe use MM/DD/YYYY strings. |
Rating out of range | Review/Tobacco | Entering 0 or 6 for ratings. | XSD rejects values outside 1‑5 range. |
Missing closing tags | All | XML is strict about tag matching. | Validate early with editor or xmllint. |
Large comment blocks | Review | Very long <Comments> bloat files. | Consider external markdown references. |
Storage quantity confusion | Tobacco | Mixing units (1 tin vs 1 oz). | Always specify StorageType with StorageQty . |
Dimension units | Pipe | Missing measurement units. | Include units in string values (e.g., "5.25 in", "2.1 oz"). |
Complex type nesting | Pipe | Forgetting to close nested <Dimensions> or <Notes> . | Validate structure early; use proper XML indentation. |
Comma-separated values | All | Temptation to use CSV instead of repeats. | Use individual elements for better structure and validation. |
Price precision | Pipe | Using strings instead of PriceType. | Use decimal values (e.g., <Price>125.50</Price> ). |
8. Minimal Examples
8.1 Minimal Review
This tiny review passes validation (only CreatedDate
required):
<?xml version="1.0" encoding="UTF-8"?>
<Review xmlns="http://example.org/pipe-review" version="1.0">
<CreatedDate>2025-09-15</CreatedDate>
<Brand>Royal Danish</Brand>
<Blend>Virginia/Latakia</Blend>
<Content>Virginia</Content>
<Content>Burley</Content>
<Flavoring>Cherry</Flavoring>
<PowerOrIntensity>4</PowerOrIntensity>
<FinalRating>4</FinalRating>
</Review>
8.2 Minimal Tobacco Entry
This basic inventory entry captures the essentials:
<?xml version="1.0" encoding="UTF-8"?>
<Tobacco xmlns="http://example.org/tobacco" version="1.0">
<Brand>MacBaren</Brand>
<Blend>Plumcake Navy Blend</Blend>
<Country>Denmark</Country>
<StorageType>Tin</StorageType>
<StorageQty>1</StorageQty>
<Status>Cellared</Status>
<Rating>3</Rating>
</Tobacco>
8.3 Minimal Pipe Entry
This basic pipe record captures the essentials:
<?xml version="1.0" encoding="UTF-8"?>
<Pipe xmlns="http://example.org/pipe" version="1.0">
<Brand>J. Mouton Pipes</Brand>
<Model>Calabash with Removable Top</Model>
<Shape>Calabash</Shape>
<CountryOfOrigin>US</CountryOfOrigin>
<Price>1</Price>
<Status>Resting</Status>
</Pipe>
9. Resources
- Review Schema: https://thepipetool.com/xml/pipe-review.xsd
- Tobacco Schema: https://thepipetool.com/xml/tobacco.xsd
- Pipe Schema: https://thepipetool.com/xml/pipe.xsd
- Sample Files:
- Online Validator: FreeFormatter XML Validator
- W3C XML Schema spec: Part 1 & Part 2
- Local Validation: Install
libxml2-utils
and usexmllint --noout --schema [schema].xsd [file].xml
- XML Editors: VS Code, IntelliJ, Eclipse, Oxygen XML Editor
Community: Submit Feedback Suggest Extensions