/* Import descriptive notation as native data. Requires Standard (Lite) or Pro. */

syntax_tree = ptb"""( (S (NP-SBJ (NNP Zoë)) (VP (VBZ sings)) (. .)))"""

pronunciation = ipa"""[prʲɪvʲet]"""

phonetic_ascii = xsampa"""pr_jIv_jet"""

harmonic_analysis = roman"""I vi6 iiø65 V7/V | V7 I"""

chord_chart = nashville"""1 6m 4 5/7 | 1"""

continuo_figures = figuredbass"""<6 4>2 <5 3>4 <_+>"""

braille_cells = brf",HELLO\n_WORLD"

orbital_elements = tle"""
NOAA 14
1 23455U 94089A   97320.90946019  .00000140  00000-0  10191-3 0  2621
2 23455  99.0090 272.6745 0008546 223.1686 136.8816 14.11711747148495
"""

written_sign = fsw"""M518x533S1870a489x515S18701482x490S20500508x496S2e734500x468"""

plant_components = dexpi"""<PlantModel><PlantInformation Application="Dexpi" ApplicationVersion="1.3" Discipline="PID" Is3D="no" SchemaVersion="4.1" Date="2026-10-30" Time="12:00:00" OriginatingSystem="Grid fixture"><UnitsOfMeasure/></PlantInformation><Equipment ID="E1" ComponentClass="Tank" TagName="T-1"/></PlantModel>"""

fixed_do = solfege"do'4. re mi8 fad sol r4"
numbered_melody = jianpu"1=Bb 4/4 KeepLength 1q 2 3. 8 - 0c"
crystal = cif"""data_crystal
_cell_length_a 5.432(1)
loop_
_atom_site_label
_atom_site_fract_x
Si1 0.0
O1 ?
"""

/* Interchange imports are data; no external tools or machine operations run. */

imported_landxml = landxml"""<LandXML xmlns="http://www.landxml.org/schema/LandXML-1.2" version="1.2"><Units><Metric linearUnit="meter" angularUnit="decimal degrees"/></Units><CoordinateSystem name="Local survey"/><CgPoints><CgPoint name="P1">100 200 3</CgPoint><CgPoint name="P2">110 220</CgPoint></CgPoints><Survey><InstrumentSetup id="S1" instrumentHeight="1.5"><InstrumentPoint pntRef="P1"/></InstrumentSetup><ObservationGroup setupID="S1"><RawObservation horizAngle="90" slopeDistance="20"><TargetPoint pntRef="P2"/></RawObservation></ObservationGroup></Survey></LandXML>"""

imported_omm = omm"""{"OBJECT_NAME": "Test satellite", "OBJECT_ID": "2026-001A", "EPOCH": "2026-10-30T12:00:00.000000", "MEAN_MOTION": 15.5, "ECCENTRICITY": 0.001, "INCLINATION": 51.6, "RA_OF_ASC_NODE": 100, "ARG_OF_PERICENTER": 20, "MEAN_ANOMALY": 30, "NORAD_CAT_ID": 123456}"""

imported_openpsa = openpsa"""<opsa-mef><define-fault-tree name="System"><define-gate name="TOP"><atleast min="2"><basic-event name="A"/><basic-event name="B"/><house-event name="H"/></atleast></define-gate><define-house-event name="H"><constant value="true"/></define-house-event><define-basic-event name="A"><float value="0.01"/></define-basic-event></define-fault-tree></opsa-mef>"""

imported_xmi = xmi"""<z:XMI xmlns:z="http://www.omg.org/spec/XMI/20131001" xmlns:u="http://www.omg.org/spec/UML/20131001"><u:Model z:id="model" name="Example"><packagedElement z:type="u:Class" z:id="base" name="Base"/><packagedElement z:type="u:Class" z:id="derived" name="Derived"><generalization z:id="g" general="base"/></packagedElement></u:Model></z:XMI>"""

imported_swu = swu"""𝠀񀀒񀀚񋚥񋛩𝠃𝤟𝤩񋛩𝣵𝤐񀀒𝤇𝣤񋚥𝤐𝤆񀀚𝣮𝣭"""

imported_knitout = knitout""";!knitout-2
;;Carriers: A B
inhook A
tuck + f-1 A
releasehook A
rack 0.25
knit - f0 A B ;!source: pattern:1
xfer f0 b0
x-speed-number 100
outhook A B
"""

russian_catalog_name = transliteration"""{"text":"Щука Царь","scheme":"russian-alalc-2012"}"""

/* Additional bounded external notation imports. */
example_humdrum = humdrum"""**kern	**solfa	**text
*	*D:	*
4c#	do	first
*^	*	*
8d	8f#	re mi	second
*v	*v	*	*
3%2.r	r	dotted tuplet
00r	r	long
*-	*-	*-
"""

example_ecli = ecli"""ECLI:EU:C:2020:559
ecli:nl:hr:2016:9"""

example_usc = usc"""42 U.S.C. § 1983
5 U.S.C. 552(a)(1) (2024)"""

example_cfr = cfr"""40 C.F.R. § 60.1(a) (2025)"""

example_oem = oem"""CCSDS_OEM_VERS = 3.0
CREATION_DATE = 2026-10-30T00:00:00
ORIGINATOR = GRID
META_START
OBJECT_NAME = Example
OBJECT_ID = 2026-001A
CENTER_NAME = EARTH
REF_FRAME = EME2000
TIME_SYSTEM = UTC
START_TIME = 2026-10-30T00:00:00
STOP_TIME = 2026-10-30T00:01:00
META_STOP
2026-10-30T00:00:00 7000 0 0 0 7.5 0
2026-10-30T00:01:00 6990 450 0 -0.5 7.4 0
COVARIANCE_START
EPOCH = 2026-10-30T00:00:00
1
0 1
0 0 1
0 0 0 0.01
0 0 0 0 0.01
0 0 0 0 0 0.01
COVARIANCE_STOP
"""

example_spice = spice"""KPL/MK
Example metadata
\begindata
PATH_VALUES = ( 'kernel''s directory' )
KERNELS_TO_LOAD = ( 'example.bsp' )
NUMBERS = ( 1D0, 2.5 )
NUMBERS += 3
EPOCHS = ( @2000-JAN-1/12:00:00 )
\begintext
Ignored trailing prose.
"""

example_sigml = sigml"""<sigml><hns_sign gloss="example" sign_language="BSL"><hamnosys_manual><hamfist/><hamextfingeru/><hampalml/><hamchest/></hamnosys_manual></hns_sign></sigml>"""

/* Import authored kvn data as native records. */
omm_kvn = omm"""
CCSDS_OMM_VERS = 3.0
CREATION_DATE = 2026-10-30T00:00:00Z
ORIGINATOR = Grid fixture
OBJECT_NAME = Example
OBJECT_ID = 2026-001A
CENTER_NAME = EARTH
REF_FRAME = TEME
TIME_SYSTEM = UTC
MEAN_ELEMENT_THEORY = SGP4
EPOCH = 2026-303T00:00:00Z
MEAN_MOTION = 15.5 [rev/day]
ECCENTRICITY = 0.001
INCLINATION = 51.6 [deg]
RA_OF_ASC_NODE = 20 [deg]
ARG_OF_PERICENTER = 30 [deg]
MEAN_ANOMALY = 40 [deg]
NORAD_CAT_ID = 9007199254740993
BSTAR = 0
MEAN_MOTION_DOT = 0
MEAN_MOTION_DDOT = 0
USER_DEFINED_LABEL = Résumé
"""

/* Import authored xml data as native records. */
omm_xml = omm"""
<omm id="CCSDS_OMM_VERS" version="3.0"><header><CREATION_DATE>2026-10-30T00:00:00Z</CREATION_DATE><ORIGINATOR>Grid fixture</ORIGINATOR></header><body><segment><metadata><OBJECT_NAME>Example</OBJECT_NAME><OBJECT_ID>2026-001A</OBJECT_ID><CENTER_NAME>EARTH</CENTER_NAME><REF_FRAME>TEME</REF_FRAME><TIME_SYSTEM>UTC</TIME_SYSTEM><MEAN_ELEMENT_THEORY>SGP4</MEAN_ELEMENT_THEORY></metadata><data><meanElements><EPOCH>2026-303T00:00:00Z</EPOCH><MEAN_MOTION units="rev/day">15.5</MEAN_MOTION><ECCENTRICITY>0.001</ECCENTRICITY><INCLINATION units="deg">51.6</INCLINATION><RA_OF_ASC_NODE>20</RA_OF_ASC_NODE><ARG_OF_PERICENTER>30</ARG_OF_PERICENTER><MEAN_ANOMALY>40</MEAN_ANOMALY></meanElements><tleParameters><NORAD_CAT_ID>9007199254740993</NORAD_CAT_ID><BSTAR>0</BSTAR><MEAN_MOTION_DOT>0</MEAN_MOTION_DOT><MEAN_MOTION_DDOT>0</MEAN_MOTION_DDOT></tleParameters><userDefinedParameters><USER_DEFINED parameter="LABEL">Résumé</USER_DEFINED></userDefinedParameters></data></segment></body></omm>
"""

/* Import authored xml data as native records. */
oem_xml = oem"""
<oem id="CCSDS_OEM_VERS" version="3.0"><header><CREATION_DATE>2026-10-30T00:00:00Z</CREATION_DATE><ORIGINATOR>Grid fixture</ORIGINATOR></header><body><segment><metadata><OBJECT_NAME>Example</OBJECT_NAME><OBJECT_ID>2026-001A</OBJECT_ID><CENTER_NAME>EARTH</CENTER_NAME><REF_FRAME>EME2000</REF_FRAME><TIME_SYSTEM>UTC</TIME_SYSTEM><START_TIME>2026-10-30T00:00:00Z</START_TIME><STOP_TIME>2026-10-30T00:00:00Z</STOP_TIME></metadata><data><COMMENT>Résumé</COMMENT><stateVector><EPOCH>2026-10-30T00:00:00Z</EPOCH><X units="km">7000</X><Y>0</Y><Z>0</Z><X_DOT units="km/s">0</X_DOT><Y_DOT>7.5</Y_DOT><Z_DOT>0</Z_DOT><X_DDOT units="km/s**2">-0.008</X_DDOT><Y_DDOT>0</Y_DDOT><Z_DDOT>0</Z_DDOT></stateVector></data></segment></body></oem>
"""

/* Import authored alignments data as native records. */
landxml_alignments = landxml"""
<LandXML xmlns="http://www.landxml.org/schema/LandXML-1.2" version="1.2"><Units><Metric linearUnit="meter" angularUnit="decimal degrees" directionUnit="decimal degrees"/></Units><CgPoints><CgPoint name="origin">0 0 100</CgPoint></CgPoints><Alignments name="Road"><Alignment name="Centerline" length="100" staStart="1000"><CoordGeom><Line length="100" dir="0"><Start pntRef="origin"/><End>100 0 101</End></Line></CoordGeom><StaEquation staInternal="50" staBack="1050" staAhead="1100"/><Profile><ProfAlign name="Design"><PVI>1000 100</PVI><ParaCurve length="20">1050 102</ParaCurve><PVI>1100 101</PVI></ProfAlign><ProfSurf name="Ground"><PntList2D>1000 99 1100 100</PntList2D></ProfSurf></Profile></Alignment></Alignments></LandXML>
"""

/* Import authored traditional data as native records. */
xiangqi_traditional = xiangqi"""
炮二平五 H8+7 +R+1 36=5
"""

/* dictionary import. */
cif_dictionary = cif"""data_dictionary
_dictionary.title example
save_atom_id
_item.name '_atom.id'
_item.category_id atom
_item_type.code code
_item.mandatory_code yes
loop_
_item_enumeration.value
A B
loop_
_item_linked.child_name
_item_linked.parent_name
'_atom.id' '_parent.id'
save_
data_legacy
_name '_atom_label'
_type char
"""

/* connectivity import. */
dexpi_connectivity = dexpi"""<PlantModel><PlantInformation Application="Dexpi" ApplicationVersion="1.3" Discipline="PID" Is3D="no" SchemaVersion="4.1" Date="2026-10-30" Time="12:00:00" OriginatingSystem="Grid fixture"><UnitsOfMeasure/></PlantInformation><Equipment ID="E1" ComponentClass="Tank" TagName="T-1"/><PipingComponent ID="P1"><ConnectionPoints><Node/><Node/></ConnectionPoints></PipingComponent><PipingNetworkSegment ID="S1"><Connection FromID="E1" ToID="P1" ToNode="1"/></PipingNetworkSegment><PipingNetworkSegment ID="S2"><Connection FromID="missing" ToID="P1"/></PipingNetworkSegment></PlantModel>"""

/* text-runs import. */
tei_text_runs = tei"""<TEI xmlns="http://www.tei-c.org/ns/1.0"><text><body><p xml:id="p1">A<hi>B</hi>C<choice><orig>colour</orig><reg>color</reg></choice><lb/>D<ref target="#p1">E</ref></p></body></text></TEI>"""

/* tuplets import. */
abc_tuplets = abc"""L:1/8
K:C
(3CDE (5:4:5FGABc"""

/* Independent visual hoists; context alternatives remain explicit. */
maritime_hoists = maritime"""A G P Z O"""

/* Explicit connectivity; isolated segment entities remain in the graph. */
graph plant_connectivity = GRAPH(dexpi"""<PlantModel><PlantInformation Application="Dexpi" ApplicationVersion="1.3" Discipline="PID" Is3D="no" SchemaVersion="4.1" Date="2026-10-30" Time="12:00:00" OriginatingSystem="Grid fixture"><UnitsOfMeasure/></PlantInformation><Equipment ID="E1" ComponentClass="Tank" TagName="T-1"/><PipingComponent ID="P1"><ConnectionPoints><Node/><Node/></ConnectionPoints></PipingComponent><PipingNetworkSegment ID="S1"><Connection FromID="E1" ToID="P1" ToNode="1"/></PipingNetworkSegment><PipingNetworkSegment ID="S2"><Connection FromID="missing" ToID="P1"/></PipingNetworkSegment></PlantModel>""")
plant_node_count = plant_connectivity.NODE_COUNT()
plant_edge_count = plant_connectivity.EDGE_COUNT()


/* DEXPI 2.x preserves object composition and references, including isolates. */
graph exchange_graph = GRAPH(dexpi"""<Model name="Example" uri="urn:grid:example"><Import prefix="P" source="urn:plant"/><Object id="tank" type="P/Tank"><References property="adjacent" objects="#port"/></Object><Object id="port" type="P/Port"/><Object id="isolated" type="P/Tank"/></Model>""")
exchange_nodes = exchange_graph.NODE_COUNT()

/* DOM edits return native XML; the original TEI projection remains unchanged. */
tei_source = tei"""<TEI xmlns="http://www.tei-c.org/ns/1.0"><text><body><p>Hello <hi>world</hi>.</p></body></text></TEI>"""
tei_xml = TO_XML(DOM_SET_TEXT(tei_source, "hi", "Grid & friends"))

/* Explicit validation consumes native CIF values; no dictionary discovery. */
cell_dictionary = cif"""data_cell
loop_ _name
'_cell_length_a' '_cell_length_b' '_cell_length_c'
_category cell
_type numb
_type_conditions esd
_enumeration_range 0.0:
_units A
"""
cell_data = cif"""data_measurement
_cell_length_a 5.959(1)
_cell_length_b 6.25
_cell_length_c 8.1
"""
cell_validation = VALIDATE_CIF(cell_data, cell_dictionary)
assigned_sign = fsw"M500x500S14d10500x500"
/* CIF 2 compound values occupy one loop cell. The first payload byte is #. */
cif2_values = cif"""#\#CIF_2.0
data_vectors
loop_
_atom.label
_atom.vector
'é1' [1.20(2) 0 0]
'é2' [0 {'x':? 'y':.} 1]
"""

/* DDLm validates the vector shape and exact bounds only when called explicitly. */
vector_dictionary = cif"""#\#CIF_2.0
data_dictionary
save_vector
_definition.id '_vector'
_type.contents Real
_type.container Array
_type.dimension '[3]'
_enumeration.range '0:10'
save_
"""
vector_measurement = cif"""#\#CIF_2.0
data_measurement
_vector [1 2 3]
"""
vector_validation = VALIDATE_CIF(vector_measurement, vector_dictionary)
