diff --git a/src/autoyast-rnc/classes-decl.rnc b/src/autoyast-rnc/classes-decl.rnc index 83720d9ae..6bb276f87 100644 --- a/src/autoyast-rnc/classes-decl.rnc +++ b/src/autoyast-rnc/classes-decl.rnc @@ -8,7 +8,7 @@ namespace config = "http://www.suse.com/1.0/configns" include "common.rnc" -autoinstall = element autoinstall { classes } +autoinstall = element autoinstall { MAP, classes } classes = element classes { LIST, @@ -20,8 +20,8 @@ class = name& order } -description = element description { text } -name = element name { text } +description = element description { STRING } +name = element name { STRING } order = element order { INTEGER } start = autoinstall diff --git a/src/autoyast-rnc/classes-use.rnc b/src/autoyast-rnc/classes-use.rnc index 331d564f7..c352ccc59 100644 --- a/src/autoyast-rnc/classes-use.rnc +++ b/src/autoyast-rnc/classes-use.rnc @@ -14,17 +14,20 @@ element classes { class = element class { - class_name & - configuration & - element dont_merge { - LIST, - element element { text }* - }? + MAP, + ( + class_name & + configuration & + element dont_merge { + LIST, + element element { STRING }* + }? + ) } class_name = -element class_name { text } +element class_name { STRING } configuration = -element configuration { text } +element configuration { STRING } diff --git a/src/autoyast-rnc/common.rnc b/src/autoyast-rnc/common.rnc index b2e856340..32dd08d5c 100644 --- a/src/autoyast-rnc/common.rnc +++ b/src/autoyast-rnc/common.rnc @@ -14,6 +14,14 @@ INTEGER = xsd:integer ) +STRING_ATTR = attribute config:type { "string" }? + +STRING = + ( + STRING_ATTR, + text + ) + SYMBOL = ( attribute config:type { "symbol" }, @@ -23,6 +31,9 @@ SYMBOL = LIST = attribute config:type { "list" } +MAP = + attribute config:type { "map" }? + # this is useful for testing Anything = ( diff --git a/src/autoyast-rnc/files.rnc b/src/autoyast-rnc/files.rnc index 9aeeb8f77..0d8bdc692 100644 --- a/src/autoyast-rnc/files.rnc +++ b/src/autoyast-rnc/files.rnc @@ -9,12 +9,20 @@ file_src = file_contents files = element files { LIST, - element file { file_src? & file_path & file_permissions? - & file_owner? & file_script? }+ + element file { + MAP, + ( + file_src? & + file_path & + file_permissions? & + file_owner? & + file_script? + ) + }+ } -file_contents = element file_contents { text } -file_location = element file_location { text } -file_path = element file_path { text } -file_permissions = element file_permissions { text } -file_owner = element file_owner { text } -file_script = element file_script { interpreter & source? & element location { text }? } +file_contents = element file_contents { STRING } +file_location = element file_location { STRING } +file_path = element file_path { STRING } +file_permissions = element file_permissions { STRING } +file_owner = element file_owner { STRING } +file_script = element file_script { MAP, (interpreter & source? & element location { STRING }? ) } diff --git a/src/autoyast-rnc/general.rnc b/src/autoyast-rnc/general.rnc index d7b410267..83d544ccd 100644 --- a/src/autoyast-rnc/general.rnc +++ b/src/autoyast-rnc/general.rnc @@ -3,97 +3,87 @@ namespace config = "http://www.suse.com/1.0/configns" namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" general = element general { - element mode { - element confirm { BOOLEAN }? & - element halt { BOOLEAN }? & - element second_stage { BOOLEAN }? & - element final_halt { BOOLEAN }? & - element final_reboot { BOOLEAN }? & - element forceboot { BOOLEAN }? & - element confirm_base_product_license { BOOLEAN }? & - element ntp_sync_time_before_installation { text }? & - element max_systemd_wait { INTEGER }? - }? & - mouse? & - ask-list? & - semi-automatic? & - minimal-configuration? & - signature-handling? & - element self_update { BOOLEAN }? & - element self_update_url { text }? & - element proposals { - LIST, - element proposal { text }* - }? & - element storage { - element start_multipath { BOOLEAN }? - }? & - element wait { - element pre-modules { - LIST, - element module { - element name { text }? & - element sleep { - element time { INTEGER }? & - element feedback { BOOLEAN }? - }? & - element script { - element debug { BOOLEAN }? & - element source { text }? - } - }* - }? & - element post-modules { - LIST, - element module { - element name { text }? & - element sleep { - element time { INTEGER }? & - element feedback { BOOLEAN }? - }? & - element script { - element debug { BOOLEAN }? & - element source { text }? - } - }* - }? - }? & - cio_ignore? + MAP, + ( + element mode { + MAP, + ( + element confirm { BOOLEAN }? & + element halt { BOOLEAN }? & + element second_stage { BOOLEAN }? & + element final_halt { BOOLEAN }? & + element final_reboot { BOOLEAN }? & + element forceboot { BOOLEAN }? & + element confirm_base_product_license { BOOLEAN }? & + element ntp_sync_time_before_installation { STRING }? & + element max_systemd_wait { INTEGER }? + ) + }? & + mouse? & + ask-list? & + semi-automatic? & + minimal-configuration? & + signature-handling? & + element self_update { BOOLEAN }? & + element self_update_url { STRING }? & + element proposals { + LIST, + element proposal { STRING }* + }? & + element storage { + MAP, + element start_multipath { BOOLEAN }? + }? & + element wait { + MAP, + ( + element pre-modules { + LIST, + module* + }? & + element post-modules { + LIST, + module* + }? + ) + }? & + cio_ignore? + ) } ask-list = element ask-list { LIST, ask* } -ask = element ask { ask_question? & ask_default? & ask_help? & ask_title? & ask_type? & ask_password? & ask_path? & ask_pathlist? & ask_stage? & ask_selection? & ask_file? & ask_dialog? & ask_element? & ask_width? & ask_height? & ask_frametitle? & ask_script? & ask_timeout? & ask_ok_label? & ask_back_label? & ask_default_value_script? } -ask_question = element question { text } -ask_default = element default { text } -ask_help = element help { text } -ask_title = element title { text } -ask_type = element type { ( "symbol" | "integer" | "boolean" | "string" ) } +ask = element ask { MAP, (ask_question? & ask_default? & ask_help? & ask_title? & ask_type? & ask_password? & ask_path? & ask_pathlist? & ask_stage? & ask_selection? & ask_file? & ask_dialog? & ask_element? & ask_width? & ask_height? & ask_frametitle? & ask_script? & ask_timeout? & ask_ok_label? & ask_back_label? & ask_default_value_script? ) } +ask_question = element question { STRING } +ask_default = element default { STRING } +ask_help = element help { STRING } +ask_title = element title { STRING } +ask_type = element type { STRING_ATTR, ( "symbol" | "integer" | "boolean" | "string" ) } ask_password = element password { BOOLEAN } -ask_path = element path { text } -ask_stage = element stage { "cont" | "initial" } +ask_path = element path { STRING } +ask_stage = element stage { STRING_ATTR, ( "cont" | "initial" ) } ask_selection = element selection { LIST, ask_selection_entry+ } -ask_selection_entry = element entry { ask_entry_value & ask_entry_label } -ask_file = element file { text } -ask_entry_value = element value { text } -ask_entry_label = element label { text } +ask_selection_entry = element entry { MAP, ( ask_entry_value & ask_entry_label ) } +ask_file = element file { STRING } +ask_entry_value = element value { STRING } +ask_entry_label = element label { STRING } ask_dialog = element dialog { INTEGER } ask_element = element element { INTEGER } ask_width = element width { INTEGER } ask_height = element height { INTEGER } -ask_frametitle = element frametitle { text } +ask_frametitle = element frametitle { STRING } ask_timeout = element timeout { INTEGER } ask_pathlist = element pathlist { LIST, ask_path* } -ask_ok_label = element ok_label { text } -ask_back_label = element back_label { text } +ask_ok_label = element ok_label { STRING } +ask_back_label = element back_label { STRING } semi-automatic = element semi-automatic { LIST, semi-automatic-modules* } -semi-automatic-modules = element module { "networking" | "partitioning" | "scc" } +semi-automatic-modules = element module { STRING_ATTR, ( "networking" | "partitioning" | "scc" ) } minimal-configuration = element minimal-configuration { BOOLEAN } -signature-handling = element signature-handling { accept_unsigned_file? & accept_file_without_checksum? & accept_verification_failed? & accept_unknown_gpg_key? & import_gpg_key? & accept_non_trusted_gpg_key? } +signature-handling = element signature-handling { MAP, ( accept_unsigned_file? & accept_file_without_checksum? & accept_verification_failed? & accept_unknown_gpg_key? & import_gpg_key? & accept_non_trusted_gpg_key? ) } accept_unsigned_file = element accept_unsigned_file { BOOLEAN } accept_file_without_checksum = element accept_file_without_checksum { BOOLEAN } accept_verification_failed = element accept_verification_failed { BOOLEAN } @@ -102,16 +92,22 @@ accept_non_trusted_gpg_key = element accept_non_trusted_gpg_key { BOOLEAN } import_gpg_key = element import_gpg_key { BOOLEAN } ask_script = element script { - element filename { text }? & - element source { text }? & - element debug { BOOLEAN }? & - element feedback { BOOLEAN }? & - element environment { BOOLEAN }? & - element rerun_on_error { BOOLEAN }? + MAP, + ( + element filename { STRING }? & + element source { STRING }? & + element debug { BOOLEAN }? & + element feedback { BOOLEAN }? & + element environment { BOOLEAN }? & + element rerun_on_error { BOOLEAN }? + ) } ask_default_value_script = element default_value_script { - element source { text } & - element interpreter { text }? + MAP, + ( + element source { STRING } & + element interpreter { STRING }? + ) } confirm = @@ -123,14 +119,35 @@ final_reboot = forceboot = element forceboot { BOOLEAN } ntp_sync_time_before_installation = - element ntp_sync_time_before_installation {text} + element ntp_sync_time_before_installation {STRING} halt = element halt { BOOLEAN } second_stage = element second_stage { BOOLEAN } -mouse = element mouse { - element id { text } +mouse = element mouse { + element id { STRING } +} + +module = element module { + MAP, + ( + element name { STRING }? & + element sleep { + MAP, + ( + element time { INTEGER }? & + element feedback { BOOLEAN }? + ) + }? & + element script { + MAP, + ( + element debug { BOOLEAN }? & + element source { STRING }? + ) } + ) +} cio_ignore = element cio_ignore { BOOLEAN } diff --git a/src/autoyast-rnc/partitioning.rnc b/src/autoyast-rnc/partitioning.rnc index f69469667..91b859186 100644 --- a/src/autoyast-rnc/partitioning.rnc +++ b/src/autoyast-rnc/partitioning.rnc @@ -9,21 +9,24 @@ partitioning = } drive = element drive { - element device { text }? & - element initialize { BOOLEAN }? & - element is_lvm_vg { BOOLEAN }? & - element lvm2 { BOOLEAN }? & - element pesize { text }? & - element type { SYMBOL }? & - element use { text }? & - element imsmdriver { SYMBOL }? & - element disklabel { text }? & - element enable_snapshots { BOOLEAN }? & - skip_list? & - partitions? & - raid_options? & - bcache_options? & - btrfs_options? + MAP, + ( + element device { STRING }? & + element initialize { BOOLEAN }? & + element is_lvm_vg { BOOLEAN }? & + element lvm2 { BOOLEAN }? & + element pesize { STRING }? & + element type { SYMBOL }? & + element use { STRING }? & + element imsmdriver { SYMBOL }? & + element disklabel { STRING }? & + element enable_snapshots { BOOLEAN }? & + skip_list? & + partitions? & + raid_options? & + bcache_options? & + btrfs_options? + ) } skip_list = @@ -33,11 +36,14 @@ skip_list = } skip_entry = element listentry { - element skip_key { text } & - element skip_value { text } & - ( element skip_if_less_than { BOOLEAN } - | element skip_if_more_than { BOOLEAN } )? & - element skip_if_equal { BOOLEAN }? + MAP, + ( + element skip_key { STRING } & + element skip_value { STRING } & + ( element skip_if_less_than { BOOLEAN } + | element skip_if_more_than { BOOLEAN } )? & + element skip_if_equal { BOOLEAN }? + ) } prefer_remove = @@ -89,63 +95,69 @@ y2_partition = partition = element partition { y2_partition* } part_create = element create { BOOLEAN } -part_crypt = element crypt { text } +part_crypt = element crypt { STRING } part_crypt_fs = element crypt_fs { BOOLEAN } part_crypt_method = element crypt_method { SYMBOL } -part_crypt_key = element crypt_key { text } +part_crypt_key = element crypt_key { STRING } part_filesystem = element filesystem { SYMBOL } part_format = element format { BOOLEAN } part_subvolumes_prefix = - element subvolumes_prefix { text } + element subvolumes_prefix { STRING } part_fs_options = element fs_options { - opt_blocksize? & - opt_block_size? & - opt_bytes_per_inode? & - opt_format? & - opt_hash? & - opt_inode_align? & - opt_max_inode_space? & - opt_raid? & - opt_reserved_blocks? + MAP, + ( + opt_blocksize? & + opt_block_size? & + opt_bytes_per_inode? & + opt_format? & + opt_hash? & + opt_inode_align? & + opt_max_inode_space? & + opt_raid? & + opt_reserved_blocks? + ) } -opt_block_size = element opt_block_size { option_str, option_value } -opt_blocksize = element opt_blocksize { option_str, option_value } + +option = MAP, (option_str, option_value ) +blank_option = MAP, (option_blank, option_str, option_value ) +opt_block_size = element opt_block_size { option } +opt_blocksize = element opt_blocksize { option } opt_bytes_per_inode = - element opt_bytes_per_inode { option_str, option_value } + element opt_bytes_per_inode { option } opt_format = - element opt_format { option_blank, option_str, option_value } -opt_hash = element opt_hash { option_blank, option_str, option_value } -opt_inode_align = element opt_inode_align { option_str, option_value } + element opt_format { blank_option } +opt_hash = element opt_hash { blank_option } +opt_inode_align = element opt_inode_align { option } opt_max_inode_space = - element opt_max_inode_space { option_str, option_value } -opt_raid = element opt_raid { option_str, option_value } + element opt_max_inode_space { option } +opt_raid = element opt_raid { option } opt_reserved_blocks = - element opt_reserved_blocks { option_str, option_value } -raid_name = element raid_name { text } + element opt_reserved_blocks { option } +raid_name = element raid_name { STRING } -raid_options = element raid_options { persistent_superblock? & chunk_size? & parity_algorithm? & raid_type? & device_order? & raid_name? } +raid_options = element raid_options { MAP, (persistent_superblock? & chunk_size? & parity_algorithm? & raid_type? & device_order? & raid_name?) } persistent_superblock = element persistent_superblock { BOOLEAN } -raid_type = element raid_type { text } -chunk_size = element chunk_size { text } -parity_algorithm = element parity_algorithm { text } +raid_type = element raid_type { STRING } +chunk_size = element chunk_size { STRING } +parity_algorithm = element parity_algorithm { STRING } device_order = element device_order { LIST, - element device { text }* + element device { STRING }* } -cache_mode = element cache_mode { "writethrough" | "writeback" | "writearound" | "none" } +cache_mode = element cache_mode { STRING_ATTR, ("writethrough" | "writeback" | "writearound" | "none") } bcache_options = element bcache_options { cache_mode? } -btrfs_name = element btrfs_name { text } +btrfs_name = element btrfs_name { STRING } -btrfs_options = element btrfs_options { data_raid_level? & metadata_raid_level? } -data_raid_level = element data_raid_level { text } -metadata_raid_level = element metadata_raid_level { text } +btrfs_options = element btrfs_options { MAP, (data_raid_level? & metadata_raid_level?) } +data_raid_level = element data_raid_level { STRING } +metadata_raid_level = element metadata_raid_level { STRING } subvolumes = element subvolumes { LIST, @@ -153,35 +165,39 @@ subvolumes = element subvolumes { } # by default, AutoYaST exports list entries as 'listentry' +# TODO: it can be configured to export it as subvolume, maybe do it? subvolume = - element (subvolume | listentry ) { text } | subvolume_full + element (subvolume | listentry ) { STRING } | subvolume_full subvolume_full = element (subvolume | listentry) { - element path { text } & - # FATE#320342: add support to enable copy-on-write for Btrfs subvolumes - element copy_on_write { BOOLEAN }? + MAP, + ( + element path { STRING } & + # FATE#320342: add support to enable copy-on-write for Btrfs subvolumes + element copy_on_write { BOOLEAN }? + ) } create_subvolumes = element create_subvolumes { BOOLEAN } -part_fstopt = element fstopt { text } -part_label = element label { text } -part_uuid = element uuid { text } +part_fstopt = element fstopt { STRING } +part_label = element label { STRING } +part_uuid = element uuid { STRING } part_loop_fs = element loop_fs { BOOLEAN } -part_mount = element mount { text } +part_mount = element mount { STRING } part_mountby = element mountby { SYMBOL } option_blank = element option_blank { BOOLEAN } -option_str = element option_str { text } -option_value = element option_value { text } -part_raid_type = element raid_type { text } +option_str = element option_str { STRING } +option_value = element option_value { STRING } +part_raid_type = element raid_type { STRING } part_partition_nr = element partition_nr { INTEGER } -part_partition_type = element partition_type { "primary" } +part_partition_type = element partition_type { STRING_ATTR, "primary" } part_partition_id = element partition_id { INTEGER } part_filesystem_id = @@ -191,7 +207,7 @@ part_stripes = part_stripesize = element stripesize { INTEGER } part_pool = element pool { BOOLEAN } -part_used_pool = element used_pool { text } +part_used_pool = element used_pool { STRING } part_region = element region { LIST, @@ -199,12 +215,12 @@ part_region = } region_entry = element region_entry { INTEGER } -part_size = element size { text } -part_lv_name = element lv_name { text } -part_lvm_group = element lvm_group { text } +part_size = element size { STRING } +part_lv_name = element lv_name { STRING } +part_lvm_group = element lvm_group { STRING } part_resize = element resize { BOOLEAN } -bcache_backing_for = element bcache_backing_for { text } +bcache_backing_for = element bcache_backing_for { STRING } bcache_caching_for = element bcache_caching_for { LIST, - element listentry { text }* + element listentry { STRING }* } diff --git a/src/autoyast-rnc/profile-misc.rnc b/src/autoyast-rnc/profile-misc.rnc index 62a31b0bc..acd5a7370 100644 --- a/src/autoyast-rnc/profile-misc.rnc +++ b/src/autoyast-rnc/profile-misc.rnc @@ -30,26 +30,27 @@ options = attribute config:type { text }?, (text | optiontags)* } -user = element user { (text | usertags)* } -lvm_group = element lvm_group { (text | lvmtags)* } -group = element group { (text | grouptags)* } +user = element user { (STRING | usertags)* } +lvm_group = element lvm_group { (STRING | lvmtags)* } +group = element group { (STRING | grouptags)* } tftp-server = element tftp-server { start_tftpd, tftp_directory } start_tftpd = element start_tftpd { BOOLEAN } -tftp_directory = element tftp_directory { text } +tftp_directory = element tftp_directory { STRING } proxy = element proxy { - enabled, ftp_proxy, http_proxy, no_proxy, proxy_password, proxy_user + MAP, + (enabled, ftp_proxy, http_proxy, no_proxy, proxy_password, proxy_user) } enabled = element enabled { BOOLEAN } -ftp_proxy = element ftp_proxy { text } -http_proxy = element http_proxy { text } -no_proxy = element no_proxy { text } -proxy_password = element proxy_password { text } -proxy_user = element proxy_user { text } +ftp_proxy = element ftp_proxy { STRING } +http_proxy = element http_proxy { STRING } +no_proxy = element no_proxy { STRING } +proxy_password = element proxy_password { STRING } +proxy_user = element proxy_user { STRING } lvm2 |= notAllowed nisplus |= notAllowed diff --git a/src/autoyast-rnc/pxe.rnc b/src/autoyast-rnc/pxe.rnc index f217df7e0..1af7a3b72 100644 --- a/src/autoyast-rnc/pxe.rnc +++ b/src/autoyast-rnc/pxe.rnc @@ -3,9 +3,12 @@ namespace config = "http://www.suse.com/1.0/configns" namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" pxe = element pxe { - element pxe_localboot { BOOLEAN }? & - element pxelinux-config { text }? & - element tftp-server { text }? & - element pxelinux-dir { text }? + MAP, + ( + element pxe_localboot { BOOLEAN }? & + element pxelinux-config { STRING }? & + element tftp-server { STRING }? & + element pxelinux-dir { STRING }? + ) } diff --git a/src/autoyast-rnc/reporting.rnc b/src/autoyast-rnc/reporting.rnc index e2c04b0ff..13338977f 100644 --- a/src/autoyast-rnc/reporting.rnc +++ b/src/autoyast-rnc/reporting.rnc @@ -4,11 +4,11 @@ default namespace = "http://www.suse.com/1.0/yast2ns" namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" namespace config = "http://www.suse.com/1.0/configns" -report = element report { errors & messages & warnings & yesno_messages? } -errors = element errors { log & show & timeout } -yesno_messages = element yesno_messages { log & show & timeout } -messages = element messages { log & show & timeout } -warnings = element warnings { log & show & timeout } +report = element report { MAP, (errors & messages & warnings & yesno_messages?) } +errors = element errors { MAP, (log & show & timeout) } +yesno_messages = element yesno_messages { MAP, (log & show & timeout) } +messages = element messages { MAP, (log & show & timeout) } +warnings = element warnings { MAP, (log & show & timeout) } # log = element log { BOOLEAN } diff --git a/src/autoyast-rnc/rules.rnc b/src/autoyast-rnc/rules.rnc index 3803efce3..50816357b 100644 --- a/src/autoyast-rnc/rules.rnc +++ b/src/autoyast-rnc/rules.rnc @@ -14,6 +14,7 @@ include "common.rnc" autoinstall = element autoinstall { + MAP, rules } @@ -25,9 +26,12 @@ element rules { rule = element rule { - y2_match_to+ & - result & - operator? + MAP, + ( + y2_match_to+ & + result & + operator? + ) } y2_match_to = @@ -55,53 +59,56 @@ y2_match_to = | totaldisk | xserver -arch = element arch { match_text & match_type? } -board = element board { match_text & match_type? } -board_vendor = element board_vendor { match_text & match_type? } -custom1 = element custom1 { match_text & match_type? & script } -custom2 = element custom2 { match_text & match_type? & script } -custom3 = element custom3 { match_text & match_type? & script } -custom4 = element custom4 { match_text & match_type? & script } -custom5 = element custom5 { match_text & match_type? & script } -disksize = element disksize { match_text & match_type? } -domain = element domain { match_text & match_type? } -haspcmica = element haspcmica { match_text & match_type? } -hostaddress = element hostaddress { match_text & match_type? } -hostid = element hostid { match_text & match_type? } -karch = element karch { match_text & match_type? } -linux = element linux { match_text & match_type? } -mac = element mac { match_text & match_type? } -memsize = element memsize { match_text & match_type? } -network = element network { match_text & match_type? } -others = element others { match_text & match_type? } -product = element product { match_text & match_type? } -product_vendor = element product_vendor { match_text & match_type? } -totaldisk = element totaldisk { match_text & match_type? } -xserver = element xserver { match_text & match_type? } +arch = element arch { MAP, (match_text & match_type?) } +board = element board { MAP, (match_text & match_type?) } +board_vendor = element board_vendor { MAP, (match_text & match_type?) } +custom1 = element custom1 { MAP, (match_text & match_type? & script) } +custom2 = element custom2 { MAP, (match_text & match_type? & script) } +custom3 = element custom3 { MAP, (match_text & match_type? & script) } +custom4 = element custom4 { MAP, (match_text & match_type? & script) } +custom5 = element custom5 { MAP, (match_text & match_type? & script) } +disksize = element disksize { MAP, (match_text & match_type?) } +domain = element domain { MAP, (match_text & match_type?) } +haspcmica = element haspcmica { MAP, (match_text & match_type?) } +hostaddress = element hostaddress { MAP, (match_text & match_type?) } +hostid = element hostid { MAP, (match_text & match_type?) } +karch = element karch { MAP, (match_text & match_type?) } +linux = element linux { MAP, (match_text & match_type?) } +mac = element mac { MAP, (match_text & match_type?) } +memsize = element memsize { MAP, (match_text & match_type?) } +network = element network { MAP, (match_text & match_type?) } +others = element others { MAP, (match_text & match_type?) } +product = element product { MAP, (match_text & match_type?) } +product_vendor = element product_vendor { MAP, (match_text & match_type?) } +totaldisk = element totaldisk { MAP, (match_text & match_type?) } +xserver = element xserver { MAP, (match_text & match_type?) } match_type = -element match_type { "greater" | "exact" | "lower" | "range" | "regex" } +element match_type { STRING_ATTR, ("greater" | "exact" | "lower" | "range" | "regex") } match_text = -element match { text } +element match { STRING } script = -element script { text } +element script { STRING } result = element result { - profile & - element dont_merge { - LIST, - element element { text }* - }? & - continue? + MAP, + ( + profile & + element dont_merge { + LIST, + element element { STRING }* + }? & + continue? + ) } profile = -element profile { text } +element profile { STRING } continue = element continue { BOOLEAN } operator = -element operator { "or" | "and" } +element operator { STRING_ATTR, ("or" | "and") } start = autoinstall diff --git a/src/autoyast-rnc/scripts.rnc b/src/autoyast-rnc/scripts.rnc index 13e8b368e..5da7a3a66 100644 --- a/src/autoyast-rnc/scripts.rnc +++ b/src/autoyast-rnc/scripts.rnc @@ -4,11 +4,14 @@ namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" scripts = element scripts { - chroot-scripts? & - post-scripts? & - pre-scripts? & - init-scripts? & - postpartitioning-scripts? + MAP, + ( + chroot-scripts? & + post-scripts? & + pre-scripts? & + init-scripts? & + postpartitioning-scripts? + ) } chroot-scripts = @@ -40,46 +43,55 @@ element postpartitioning-scripts { # script is overloaded autoinstall-script = element script { - filename? & - interpreter? & - element location { text }? & - source? & - debug? & - feedback? & - feedback_type? & - param-list? & - element notification { text }? + MAP, + ( + filename? & + interpreter? & + element location { STRING }? & + source? & + debug? & + feedback? & + feedback_type? & + param-list? & + element notification { STRING }? + ) } autoinstall-init-script = element script { - debug? & - filename? & - element location { text }? & - source? + MAP, + ( + debug? & + filename? & + element location { STRING }? & + source? + ) } autoinstall-chroot-script = element script { - chrooted? & - filename? & - interpreter? & - element location { text }? & - source? & - debug? & - feedback? & - feedback_type? & - param-list? & - element notification { text }? + MAP, + ( + chrooted? & + filename? & + interpreter? & + element location { STRING }? & + source? & + debug? & + feedback? & + feedback_type? & + param-list? & + element notification { STRING }? + ) } param-list = element param-list { LIST, - element param { text }* + element param { STRING }* } chrooted = element chrooted { BOOLEAN } debug = element debug { BOOLEAN } feedback = element feedback { BOOLEAN } -feedback_type = element feedback_type { text } -filename = element filename { text } -interpreter = element interpreter { text } -source = element source { text } +feedback_type = element feedback_type { STRING } +filename = element filename { STRING } +interpreter = element interpreter { STRING } +source = element source { STRING } diff --git a/src/autoyast-rnc/software.rnc b/src/autoyast-rnc/software.rnc index db16fd36d..2a4c73cce 100644 --- a/src/autoyast-rnc/software.rnc +++ b/src/autoyast-rnc/software.rnc @@ -4,72 +4,78 @@ namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" software = element software { - kernel? & - packages? & - post-packages? & - post-patterns? & - remove-packages? & - patterns? & - remove-patterns? & - products? & - remove-products? & - image? & - element do_online_update { BOOLEAN }? & - element install_recommended { BOOLEAN }? & - element instsource {text}? + MAP, + ( + kernel? & + packages? & + post-packages? & + post-patterns? & + remove-packages? & + patterns? & + remove-patterns? & + products? & + remove-products? & + image? & + element do_online_update { BOOLEAN }? & + element install_recommended { BOOLEAN }? & + element instsource {STRING}? + ) } patterns = element patterns { LIST, - element (pattern | listentry) { text }+ + element (pattern | listentry) { STRING }+ } -kernel = element kernel { text } +kernel = element kernel { STRING } post-packages = element post-packages { LIST, - element (package | listentry) {text}+ + element (package | listentry) {STRING}+ } post-patterns = element post-patterns { LIST, - element (pattern | listentry) {text}+ + element (pattern | listentry) {STRING}+ } packages = element packages { LIST, - element (package | listentry) {text}+ + element (package | listentry) {STRING}+ } remove-packages = element remove-packages { LIST, - element (package | listentry) {text}+ + element (package | listentry) {STRING}+ } remove-patterns = element remove-patterns { LIST, - element (pattern | listentry) {text}+ + element (pattern | listentry) {STRING}+ } products = element products { LIST, - element (product | listentry) {text}+ + element (product | listentry) {STRING}+ } remove-products = element remove-products { LIST, - element (product | listentry) {text}+ + element (product | listentry) {STRING}+ } script_params = element script_params { LIST, - element listentry { text } + element listentry { STRING } } image = element image { - element image_location { text }? & - element image_name { text }? & - element script_location { text }? & - script_params? & - element run_kickoff { BOOLEAN }? + MAP, + ( + element image_location { STRING }? & + element image_name { STRING }? & + element script_location { STRING }? & + script_params? & + element run_kickoff { BOOLEAN }? + ) }