SML Data Format

Surface Markup Language is XML (Extensible Markup Language) based. SML is a flexible data format. It allows the user to define tags that serve as attributes for the data. SML covers five major elements: part, process, measurement conditions, data file, and analysis data. The attributes and relationship of these elements are defined in a Document Type Definition (DTD).  DTD defines what tags or blocks of an XML document are valid for that document.  Below is the DTD of SML.

<!-- data.dtd

SXML: Surface Markup Language - version: alpha

There are five major elements in this DTD: Part, Process, Measurement Conditions, Data File, Analysis Data
-->

<!ELEMENT DATA (PART+,PROCESS+,DATAFILE+,ANALYSIS)>


<!--
Part information
    PART_NAME: required. Name of a part
    PART_DATE: required. Date when a part was made
-->
<!ELEMENT PART (PART_NAME,PART_DATE)>
<!ELEMENT PART_NAME (#PCDATA)>
<!ELEMENT PART_DATE (#PCDATA)>

<!--
Process information
    PROCESS_NAME: required. Name of the process
    PROCESS_DATE: required. Date of the process
-->
<!ELEMENT PROCESS (PROCESS_NAME, PROCESS_DATE)>
<!ELEMENT PROCESS_NAME (#PCDATA)>
<!ELEMENT PROCESS_DATE (#PCDATA)>

<!--
Data File information
    FILENAME: required. Data file name
    UNIT: required. unit in SI metric or english
    NUMPOINTS: required. Number of data points
    SPACING: required. Spacing between two data points in x direction
    DATAPOINTS: required. values of data points; all data points are contained in a single string
-->
<!ELEMENT DATAFILE (FILENAME,UNIT, NUMPOINTS,SPACING,DATAPOINTS)>
<!ELEMENT FILENAME (#PCDATA)>
<!ELEMENT UNIT (#PCDATA)>
<!ELEMENT NUMPOINTS (#PCDATA)>
<!ELEMENT SPACING (#PCDATA)>
<!ELEMENT DATAPOINTS (#PCDATA)>

<!--
Analysis Data information
    CURVATURE_REMOVAL: optional. Information ragarding least square curve fitting to a polynominal
    FILTER: optional. Filtering information
    STATISTICAL_ANALYSIS: optional. PSD or Correlation information
-->
<!ELEMENT ANALYSIS (CURVATURE_REMOVAL?, FILTER?, STATISTICAL_ANALYSIS?)>

<!--
Curvature removal information
    LSQ_COEFF: required. Least Square Cofficients; all coefficients are contained in a single string
-->
<!ELEMENT CURVATURE_REMOVAL (LSQ_COEFF)>
<!ELEMENT LSQ_COEFF (#PCDATA)>

<!--
Filtering information
    FILTER_TYPE: required. Filter Type (Gaussian or Two RC filter)
    SHORT_CUTOFF: optional. Short Cutoff
    CUTOFF: required. Long Cutoff
    METHOD: required. Filtering implementation method such as covolution, recursive, or FFT
    LSQ_REMOVED_PROFILE: optional. Least Squares Removed Profile obtained from the Curvature Removal Process
    SHORT_CUTOFF_PROFILE: optional. Primary Profile
    RAW_PROFILE: optional. Total Profile
    ROUGHNESS: required. Roughness Profile
    WAVINESS: required. Waviness Profile
-->
<!ELEMENT FILTER (FILTER_TYPE,SHORT_CUTOFF?,CUTOFF,METHOD,LSQ_REMOVED_PROFILE?, SHORT_CUTOFF_PROFILE?,RAW_PROFILE?,ROUGHNESS,WAVINESS)>
<!ELEMENT FILTER_TYPE (#PCDATA)>
<!ELEMENT SHORT_CUTOFF (#PCDATA)>
<!ELEMENT CUTOFF (#PCDATA)>
<!ELEMENT METHOD (#PCDATA)>

<!--
Least Square Removed Profile's surface parameters information
    Pa: required. Arithmetical mean deviation of the assessed profile
    Pq: required. Root mean square deviation of the assessed profile
    Psk: required. Skewness of the assessed profile
    Pku: required. Kurtosis of the assessed profile
    Pz: required. Maximum height of profile  
    PDq: required. root mean square slope of the assessed profile
    PSm: required. mean width of the profile elements
    Pt: required. Total Height of Profile
    Pp: required. Maximum Profile Peak Height
    Pv: required. Maximum Profile Valley Depth
-->
<!ELEMENT LSQ_REMOVED_PROFILE (LSQ_REMOVED_PROFILE_SURFACE_PARAMETERS?)>
<!ELEMENT LSQ_REMOVED_PROFILE_SURFACE_PARAMETERS (PA,PQ,PSK,PKU,PZ,PDq,PSm,Pt,Pp,Pv)>
<!ELEMENT PA (#PCDATA)>
<!ELEMENT PQ (#PCDATA)>
<!ELEMENT PSK (#PCDATA)>
<!ELEMENT PKU (#PCDATA)>
<!ELEMENT PZ (#PCDATA)>
<!ELEMENT PDq (#PCDATA)>
<!ELEMENT PSm (#PCDATA)>
<!ELEMENT Pt (#PCDATA)>
<!ELEMENT Pp (#PCDATA)>
<!ELEMENT Pv (#PCDATA)>

<!--
Primary Profile's surface parameters information
    Pa: required. Arithmetical mean deviation of the assessed profile
    Pq: required. Root mean square deviation of the assessed profile
    Psk: required. Skewness of the assessed profile
    Pku: required. Kurtosis of the assessed profile
    Pz: required. Maximum height of profile  
    PDq: required. root mean square slope of the assessed profile
    PSm: required. mean width of the profile elements
    Pt: required. Total Height of Profile
    Pp: required. Maximum Profile Peak Height
    Pv: required. Maximum Profile Valley Depth
    SHORT_CUTOFF_PROFILE_NUMBPOINTS: required. number of data points
-->
<!ELEMENT SHORT_CUTOFF_PROFILE (SHORT_CUTOFF_PROFILE_SURFACE_PARAMETERS?,SHORT_CUTOFF_PROFILE_NUMBPOINTS)>
<!ELEMENT SHORT_CUTOFF_PROFILE_SURFACE_PARAMETERS (PA,PQ,PSK,PKU,PZ,PDq,PSm,Pt,Pp,Pv)>
<!ELEMENT SHORT_CUTOFF_PROFILE_NUMBPOINTS (#PCDATA)>

<!--
Raw Profile's surface parameters information
    Pa: required. Arithmetical mean deviation of the assessed profile
    Pq: required. Root mean square deviation of the assessed profile
    Psk: required. Skewness of the assessed profile
    Pku: required. Kurtosis of the assessed profile
    Pz: required. Maximum height of profile  
    PDq: required. root mean square slope of the assessed profile
    PSm: required. mean width of the profile elements
    Pt: required. Total Height of Profile
    Pp: required. Maximum Profile Peak Height
    Pv: required. Maximum Profile Valley Depth
-->
<!ELEMENT RAW_PROFILE (RAW_PROFILE_SURFACE_PARAMETERS?)>
<!ELEMENT RAW_PROFILE_SURFACE_PARAMETERS (PA,PQ,PSK,PKU,PZ,PDq,PSm,Pt,Pp,Pv)>

<!--
Roughness Profile's surface parameters information
    Ra: required. Arithmetical mean deviation of the assessed profile
    Rq: required. Root mean square deviation of the assessed profile
    Rsk: required. Skewness of the assessed profile
    Rku: required. Kurtosis of the assessed profile
    Rz: required. Maximum height of profile  
    RDq: required. root mean square slope of the assessed profile
    RSm: required. mean width of the profile elements
    Rt: required. Total Height of Profile
    Rp: required. Maximum Profile Peak Height
    Rv: required. Maximum Profile Valley Depth
    ROUGHNESS_NUMPOINTS: required. number of data points
-->
<!ELEMENT ROUGHNESS (ROUGHNESS_SURFACE_PARAMETERS?,ROUGHNESS_NUMPOINTS)>
<!ELEMENT ROUGHNESS_SURFACE_PARAMETERS (RA,RQ,RSK,RKU,RZ,RDq,RSm,Rt,Rp_ASMEB46,Rv_ASMEB46,Rp_ISO4287,Rv_ISO4287)>
<!ELEMENT RA (#PCDATA)>
<!ELEMENT RQ (#PCDATA)>
<!ELEMENT RSK (#PCDATA)>
<!ELEMENT RKU (#PCDATA)>
<!ELEMENT RZ (#PCDATA)>
<!ELEMENT RDq (#PCDATA)>
<!ELEMENT RSm (#PCDATA)>
<!ELEMENT Rt (#PCDATA)>
<!ELEMENT Rp_ASMEB46 (#PCDATA)>
<!ELEMENT Rv_ASMEB46 (#PCDATA)>
<!ELEMENT Rp_ISO4287 (#PCDATA)>
<!ELEMENT Rv_ISO4287 (#PCDATA)>
<!ELEMENT ROUGHNESS_NUMPOINTS (#PCDATA)>

<!--
Waviness Profile's surface parameters information
    Wa: required. Arithmetical mean deviation of the assessed profile
    Wq: required. Root mean square deviation of the assessed profile
    Wsk: required. Skewness of the assessed profile
    Wku: required. Kurtosis of the assessed profile
    Wz: required. Maximum height of profile  
    WDq: required. root mean square slope of the assessed profile
    WSm: required. mean width of the profile elements
    Wt: required. Total Height of Profile
    Wp: required. Maximum Profile Peak Height
    Wv: required. Maximum Profile Valley Depth
    WAVINESS_NUMPOINTS: required. number of data points
-->
<!ELEMENT WAVINESS (WAVINESS_SURFACE_PARAMETERS?,WAVINESS_NUMPOINTS)>
<!ELEMENT WAVINESS__SURFACE_PARAMETERS (WA,WQ,WSK,WKU,WZ,WDq,WSm,Wt,Wp_ASMEB46,Wv_ASMEB46,Wp_ISO4287,Wv_ISO4287)>
<!ELEMENT WA (#PCDATA)>
<!ELEMENT WQ (#PCDATA)>
<!ELEMENT WSK (#PCDATA)>
<!ELEMENT WKU (#PCDATA)>
<!ELEMENT WZ (#PCDATA)>
<!ELEMENT WDq (#PCDATA)>
<!ELEMENT Wt (#PCDATA)>
<!ELEMENT Wp_ASMEB46 (#PCDATA)>
<!ELEMENT Wv_ASMEB46 (#PCDATA)>
<!ELEMENT Wp_ISO4287 (#PCDATA)>
<!ELEMENT Wv_ISO4287 (#PCDATA)>
<!ELEMENT WSm (#PCDATA)>
<!ELEMENT WAVINESS_NUMPOINTS (#PCDATA)>

<!--
Statistical Analysis information
    PSD: optional. Power Spectral Density
    AUTOCORRELATION: optional. Auto Correlation
-->
<!ELEMENT STATISTICAL_ANALYSIS (PSD?,AUTOCORRELATION?)>

<!--
Power Spectral Density information
    PSD_PROFILE_TYPE: required. indicate which type of a profile, such as primary, waviness or roughess, is applied by PSD
    PSD_METHOD: required. Method to calculate PSD
    PSD_NUMPOINTS: required. Number of PSD data points
    FREQUENCY_RESOLUTION: required. fequency resolution of PSD
    Rq_SQUARE: required. Square of rms. This must be equal to 2 times PSD area
    TWO_PSD_AREA: required.  Twice Area under PSD curve
    PSD_DATAPOINTS: required. Data points of PSD
-->
<!ELEMENT PSD (PSD_PROFILE_TYPE,PSD_METHOD,PSD_NUMPOINTS,FREQUENCY_RESOLUTION,Rq_SQUARE,TWO_PSD_AREA,PSD_DATAPOINTS)>
<!ELEMENT PSD_PROFILE_TYPE (#PCDATA)>
<!ELEMENT PSD_METHOD (#PCDATA)>
<!ELEMENT PSD_NUMPOINTS (#PCDATA)>
<!ELEMENT FREQUENCY_RESOLUTION (#PCDATA)>
<!ELEMENT Rq_SQUARE (#PCDATA)>
<!ELEMENT TWO_PSD_AREA (#PCDATA)>
<!ELEMENT PSD_DATAPOINTS (#PCDATA)>

<!--
Autocorrelation information
    AUTOC_PROFILE_TYPE: required. indicate which type of a profile, such as primary, waviness or roughess, is applied by Autocorrelation
    AUTOC_METHOD: required. Method to calculate PSD
    AUTOC_NUMPOINTS: required. Number of Autocorrelation data points
    AUTOC_DATAPOINTS: required. Data points of Autocorrelation
-->
<!ELEMENT AUTOCORRELATION (AUTOC_PROFILE_TYPE,AUTOC_METHOD,AUTOC_NUMPOINTS,AUTOC_DATAPOINTS)>
<!ELEMENT AUTOC_PROFILE_TYPE (#PCDATA)>
<!ELEMENT AUTOC_METHOD (#PCDATA)>
<!ELEMENT AUTOC_NUMPOINTS (#PCDATA)>
<!ELEMENT AUTOC_DATAPOINTS (#PCDATA)>