Import libxo 0.8.0

This commit is contained in:
Phil Shafer 2017-06-08 12:58:33 +00:00
parent f720a75aba
commit b51d075789
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/Juniper/libxo/dist/; revision=319692
svn path=/vendor/Juniper/libxo/0.8.0/; revision=319693; tag=vendor/Juniper/libxo/0.8.0
41 changed files with 3394 additions and 2932 deletions

View File

@ -100,4 +100,25 @@ ANALYZE_DIR = ~/trash/libxo
ANALYZE_CMD = scan-build-mp-3.6
analyze:
${MAKE} clean
${ANALYZE_CMD} -o ${ANALYZE_DIR} ${MAKE}
SANIFLAGS=-fno-omit-frame-pointer -g -O2
sanitize-address:
${MAKE} clean
${MAKE} CFLAGS="-fsanitize=address ${SANIFLAGS}"
${MAKE} install
${MAKE} test
sanitize-undefined:
${MAKE} clean
${MAKE} CFLAGS="-fsanitize=undefined ${SANIFLAGS}"
${MAKE} install
${MAKE} test
sanitize-memory:
${MAKE} clean
${MAKE} CFLAGS="-fsanitize=memory ${SANIFLAGS}"
${MAKE} install
${MAKE} test

View File

@ -12,7 +12,7 @@
#
AC_PREREQ(2.2)
AC_INIT([libxo], [0.7.2], [phil@juniper.net])
AC_INIT([libxo], [0.8.0], [phil@juniper.net])
AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
# Support silent build rules. Requires at least automake-1.11.

File diff suppressed because it is too large Load Diff

View File

@ -16,11 +16,28 @@ You want to prepare for the future, but you need to live in the
present. You'd love a flying car, but need to get to work today. You
want to support features like XML, JSON, and HTML rendering to allow
integration with NETCONF, REST, and web browsers, but you need to make
text output for command line users. And you don't want multiple code
paths that can't help but get out of sync. None of this "if (xml)
{... } else {...}" logic. And ifdefs are right out. But you'd
really, really like all the fancy features that modern encoding
formats can provide. libxo can help.
text output for command line users.
And you don't want multiple code paths that can't help but get out of
sync:
/* None of this "if (xml) {... } else {...}" logic */
if (xml) {
/* some code to make xml*/
} else {
/* other code to make text */
/* oops forgot to add something on both clauses! */
}
/* And ifdefs are right out. */
#ifdef MAKE_XML
/* icky */
#else
/* pooh */
#endif
But you'd really, really like all the fancy features that modern
encoding formats can provide. libxo can help.
The libxo library allows an application to generate text, XML, JSON,
and HTML output using a common set of function calls. The application
@ -35,8 +52,11 @@ braces with a printf-like format string (^format-strings^):
linect, wordct, charct, file);
Each field can have a role, with the 'value' role being the default,
and the role tells libxo how and when to render that field. Output
can then be generated in various style, using the "--libxo" option:
and the role tells libxo how and when to render that field (see
^field-roles^ for details). Modifiers change how the field is
rendered in different output styles (see ^field-modifiers^ for
details. Output can then be generated in various style, using the
"--libxo" option:
% wc /etc/motd
25 165 1140 /etc/motd
@ -74,7 +94,12 @@ can then be generated in various style, using the "--libxo" option:
<div class="data" data-tag="filename">/etc/motd</div>
</div>
** Getting libxo
Same code path, same format strings, same information, but it's
rendered in distinct styles based on run-time flags.
* Getting libxo
libxo now ships as part of the FreeBSD Operating System (as of -11).
libxo lives on github as:
@ -101,7 +126,7 @@ as part of the FreeBSD operating system starting with release 11.0.
Issues, problems, and bugs should be directly to the issues page on
our github site.
*** Downloading libxo Source Code
** Downloading libxo Source Code
You can retrieve the source for libxo in two ways:
@ -140,7 +165,7 @@ download the source code from svn, then you'll need to run
"autoreconf" by hand. This step is done for you by the "setup.sh"
script, described in the next section.
*** Building libxo
** Building libxo
To build libxo, you'll need to set up the build, run the "configure"
script, run the "make" command, and run the regression tests.
@ -159,7 +184,7 @@ The following sections will walk through each of these steps with
additional details and options, but the above directions should be all
that's needed.
**** Setting up the build
*** Setting up the build
[If you downloaded a distfile, you can skip this step.]
@ -171,7 +196,7 @@ generated files.
Note: We're are currently using autoreconf version 2.69.
**** Running the "configure" Script
*** Running the "configure" Script
Configure (and autoconf in general) provides a means of building
software in diverse environments. Our configure script supports
@ -221,7 +246,7 @@ machine. To run the regression tests:
make test
**** Installing libxo
*** Installing libxo
Once the software is built, you'll need to install libxo using the
"make install" command. If you are the root user, or the owner of the
@ -544,6 +569,15 @@ The following color names are supported:
| yellow | |
|---------+--------------------------------------------|
When using colors, the developer should remember that users will
change the foreground and background colors of terminal session
according to their own tastes, so assuming that "blue" looks nice is
never safe, and is a constant annoyance to your dear author. In
addition, a significant percentage of users (1 in 12) will be color
blind. Depending on color to convey critical information is not a
good idea. Color should enhance output, but should not be used as the
sole means of encoding information.
**** The Decoration Role ({D:})
Decorations are typically punctuation marks such as colons,
@ -818,7 +852,7 @@ more meaningful.
"hn" can be used as an alias for "humanize".
The humanize modifier only affects display styles (TEXT and HMTL).
The "no-humanize" option (See ^LIBXO_OPTIONS^) will block the function of
The "no-humanize" option (See ^options^) will block the function of
the humanize modifier.
There are a number of modifiers that affect details of humanization.
@ -1444,7 +1478,7 @@ properly.
xo_close_marker("fish-guts");
}
** Command-line Arguments
* Command-line Arguments @options@
libxo uses command line options to trigger rendering behavior. The
following options are recognised:
@ -1453,9 +1487,17 @@ following options are recognised:
- --libxo=<options>
- --libxo:<brief-options>
The following invocations are all identical in outcome:
my-app --libxo warn,pretty arg1
my-app --libxo=warn,pretty arg1
my-app --libxo:WP arg1
Programs using libxo are expecting to call the xo_parse_args function
to parse these arguments. See ^xo_parse_args^ for details.
** Option keywords
Options is a comma-separated list of tokens that correspond to output
styles, flags, or features:
@ -1463,6 +1505,7 @@ styles, flags, or features:
| Token | Action |
|-------------+-------------------------------------------------------|
| color | Enable colors/effects for display styles (TEXT, HTML) |
| colors=xxxx | Adjust color output values |
| dtrt | Enable "Do The Right Thing" mode |
| flush | Flush after every libxo function call |
| flush-line | Flush after every line (line-buffered) |
@ -1489,11 +1532,10 @@ styles, flags, or features:
| xpath | Add XPath expressions (HTML) |
|-------------+-------------------------------------------------------|
The brief options are detailed in ^LIBXO_OPTIONS^.
Most of these option are simple and direct, but some require
additional details:
- "colors" is described in ^color-mapping^.
- "flush-line" performs line buffering, even when the output is not
directed to a TTY device.
- "info" generates additional data for HTML, encoded in attributes
@ -1513,6 +1555,73 @@ make incorrect calls.
- "warn-xml" causes those warnings to be placed in XML inside the
output.
** Brief Options
The brief options are simple single-letter aliases to the normal
keywords, as detailed below:
|--------+---------------------------------------------|
| Option | Action |
|--------+---------------------------------------------|
| c | Enable color/effects for TEXT/HTML |
| F | Force line-buffered flushing |
| H | Enable HTML output (XO_STYLE_HTML) |
| I | Enable info output (XOF_INFO) |
| i<num> | Indent by <number> |
| J | Enable JSON output (XO_STYLE_JSON) |
| k | Add keys to XPATH expressions in HTML |
| n | Disable humanization (TEXT, HTML) |
| P | Enable pretty-printed output (XOF_PRETTY) |
| T | Enable text output (XO_STYLE_TEXT) |
| U | Add units to HTML output |
| u | Change "-"s to "_"s in element names (JSON) |
| W | Enable warnings (XOF_WARN) |
| X | Enable XML output (XO_STYLE_XML) |
| x | Enable XPath data (XOF_XPATH) |
|--------+---------------------------------------------|
** Color Mapping
The "colors" option takes a value that is a set of mappings from the
pre-defined set of colors to new foreground and background colors.
The value is a series of "fg/bg" values, separated by a "+". Each
pair of "fg/bg" values gives the colors to which a basic color is
mapped when used as a foreground or background color. The order is
the mappings is:
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
Pairs may be skipped, leaving them mapped as normal, as are missing
pairs or single colors.
For example consider the following xo_emit call:
xo_emit("{C:fg-red,bg-green}Merry XMas!!{C:}\n");
To turn all colored output to red-on-blue, use eight pairs of
"red/blue" mappings separated by "+"s:
--libxo colors=red/blue+red/blue+red/blue+red/blue+\
red/blue+red/blue+red/blue+red/blue
To turn the red-on-green text to magenta-on-cyan, give a "magenta"
foreground value for red (the second mapping) and a "cyan" background
to green (the third mapping):
--libxo colors=+magenta+/cyan
Consider the common situation where blue output looks unreadable on a
terminal session with a black background. To turn both "blue"
foreground and background output to "yellow", give only the fifth
mapping, skipping the first four mappings with bare "+"s:
--libxo colors=++++yellow/yellow
* The libxo API
@ -1741,7 +1850,7 @@ and flags and enables them for a specific handle.
int xo_set_options (xo_handle_t *xop, const char *input);
The options are identical to those listed in ^command-line-arguments^.
The options are identical to those listed in ^options^.
*** xo_destroy
@ -1965,7 +2074,7 @@ is returned. On failure, a message it emitted and -1 is returned.
exit(EXIT_FAILURE);
Following the call to xo_parse_args, the application can process the
remaining arguments in a normal manner. See ^command-line-arguments^
remaining arguments in a normal manner. See ^options^
for a description of valid arguments.
*** xo_set_program
@ -2056,36 +2165,24 @@ By default, the standard realloc() and free() functions are used.
*** LIBXO_OPTIONS @LIBXO_OPTIONS@
The environment variable "LIBXO_OPTIONS" can be set to a string of
options:
The environment variable "LIBXO_OPTIONS" can be set to a subset of
libxo options, including:
|--------+---------------------------------------------|
| Option | Action |
|--------+---------------------------------------------|
| c | Enable color/effects for TEXT/HTML |
| F | Force line-buffered flushing |
| H | Enable HTML output (XO_STYLE_HTML) |
| I | Enable info output (XOF_INFO) |
| i<num> | Indent by <number> |
| J | Enable JSON output (XO_STYLE_JSON) |
| k | Add keys to XPATH expressions in HTML |
| n | Disable humanization (TEXT, HTML) |
| P | Enable pretty-printed output (XOF_PRETTY) |
| T | Enable text output (XO_STYLE_TEXT) |
| U | Add units to HTML output |
| u | Change "-"s to "_"s in element names (JSON) |
| W | Enable warnings (XOF_WARN) |
| X | Enable XML output (XO_STYLE_XML) |
| x | Enable XPath data (XOF_XPATH) |
|--------+---------------------------------------------|
- color
- flush
- flush-line
- no-color
- no-humanize
- no-locale
- no-retain
- pretty
- retain
- underscores
- warn
For example, warnings can be enabled by:
% env LIBXO_OPTIONS=W my-app
Complete HTML output can be generated with:
% env LIBXO_OPTIONS=HXI my-app
% env LIBXO_OPTIONS=warn my-app
Since environment variables are inherited, child processes will have
the same options, which may be undesirable, making the use of the
@ -2474,9 +2571,9 @@ HTML using the same commands that emit text output.
The style of output can be selected using a specific option: "-X" for
XML, "-J" for JSON, "-H" for HTML, or "-T" for TEXT, which is the
default. The "--style <style>" option can also be used. The
LIBXO_OPTIONS environment variable can also be used to set the style,
as well as other flags.
default. The "--style <style>" option can also be used. The standard
set of "--libxo" options are available (see ^options^), as well as the
LIBXO_OPTIONS environment variable (see ^LIBXO_OPTIONS^).
The "xo" utility accepts a format string suitable for xo_emit() and a
set of zero or more arguments used to supply data for that string.

View File

@ -249,7 +249,7 @@ cbor_handler (XO_ENCODER_HANDLER_ARGS)
if (xo_get_flags(xop) & XOF_PRETTY) {
printf("%*sop %s: [%s] [%s]\n", cbor ? cbor->c_indent * 2 + 4 : 0, "",
xo_encoder_op_name(op), name ?: "", value ?: "");
xo_encoder_op_name(op), name, value);
fflush(stdout);
}

View File

@ -14,8 +14,8 @@
static int
test_handler (XO_ENCODER_HANDLER_ARGS)
{
printf("op %s: [%s] [%s]\n", xo_encoder_op_name(op),
name ?: "", value ?: "");
printf("op %s: [%s] [%s] [%#llx]\n", xo_encoder_op_name(op),
name ?: "", value ?: "", flags);
return 0;
}

View File

@ -203,6 +203,7 @@ typedef struct xo_stack_s {
* XO_COL_* ("colors") refers to fancy ansi codes, while X__EFF_*
* ("effects") are bits since we need to maintain state.
*/
typedef uint8_t xo_color_t;
#define XO_COL_DEFAULT 0
#define XO_COL_BLACK 1
#define XO_COL_RED 2
@ -279,8 +280,10 @@ struct xo_handle_s {
ssize_t xo_anchor_min_width; /* Desired width of anchored text */
ssize_t xo_units_offset; /* Start of units insertion point */
ssize_t xo_columns; /* Columns emitted during this xo_emit call */
#ifndef LIBXO_TEXT_ONLY
uint8_t xo_color_map_fg[XO_NUM_COLORS]; /* Foreground color mappings */
uint8_t xo_color_map_bg[XO_NUM_COLORS]; /* Background color mappings */
#endif /* LIBXO_TEXT_ONLY */
xo_colors_t xo_colors; /* Current color and effect values */
xo_buffer_t xo_color_buf; /* HTML: buffer of colors and effects */
char *xo_version; /* Version string */
@ -461,6 +464,12 @@ static ssize_t
xo_transition (xo_handle_t *xop, xo_xsf_flags_t flags, const char *name,
xo_state_t new_state);
static int
xo_set_options_simple (xo_handle_t *xop, const char *input);
static int
xo_color_find (const char *str);
static void
xo_buf_append_div (xo_handle_t *xop, const char *class, xo_xff_flags_t flags,
const char *name, ssize_t nlen,
@ -627,13 +636,6 @@ xo_init_handle (xo_handle_t *xop)
if (xo_is_line_buffered(stdout))
XOF_SET(xop, XOF_FLUSH_LINE);
/*
* We only want to do color output on terminals, but we only want
* to do this if the user has asked for color.
*/
if (XOF_ISSET(xop, XOF_COLOR_ALLOWED) && isatty(1))
XOF_SET(xop, XOF_COLOR);
/*
* We need to initialize the locale, which isn't really pretty.
* Libraries should depend on their caller to set up the
@ -667,15 +669,6 @@ xo_init_handle (xo_handle_t *xop)
xop->xo_indent_by = XO_INDENT_BY;
xo_depth_check(xop, XO_DEPTH);
#if !defined(NO_LIBXO_OPTIONS)
if (!XOF_ISSET(xop, XOF_NO_ENV)) {
char *env = getenv("LIBXO_OPTIONS");
if (env)
xo_set_options(xop, env);
}
#endif /* NO_GETENV */
XOIF_CLEAR(xop, XOIF_INIT_IN_PROGRESS);
}
@ -689,6 +682,15 @@ xo_default_init (void)
xo_init_handle(xop);
#if !defined(NO_LIBXO_OPTIONS)
if (!XOF_ISSET(xop, XOF_NO_ENV)) {
char *env = getenv("LIBXO_OPTIONS");
if (env)
xo_set_options_simple(xop, env);
}
#endif /* NO_LIBXO_OPTIONS */
xo_default_inited = 1;
}
@ -1041,32 +1043,36 @@ xo_printf (xo_handle_t *xop, const char *fmt, ...)
* These next few function are make The Essential UTF-8 Ginsu Knife.
* Identify an input and output character, and convert it.
*/
static uint8_t xo_utf8_bits[7] = { 0, 0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01 };
static uint8_t xo_utf8_data_bits[5] = { 0, 0x7f, 0x1f, 0x0f, 0x07 };
static uint8_t xo_utf8_len_bits[5] = { 0, 0x00, 0xc0, 0xe0, 0xf0 };
/*
* If the byte has a high-bit set, it's UTF-8, not ASCII.
*/
static int
xo_is_utf8 (char ch)
{
return (ch & 0x80);
}
/*
* Look at the high bits of the first byte to determine the length
* of the UTF-8 character.
*/
static inline ssize_t
xo_utf8_to_wc_len (const char *buf)
{
unsigned b = (unsigned char) *buf;
uint8_t bval = (uint8_t) *buf;
ssize_t len;
if ((b & 0x80) == 0x0)
if ((bval & 0x80) == 0x0)
len = 1;
else if ((b & 0xe0) == 0xc0)
else if ((bval & 0xe0) == 0xc0)
len = 2;
else if ((b & 0xf0) == 0xe0)
else if ((bval & 0xf0) == 0xe0)
len = 3;
else if ((b & 0xf8) == 0xf0)
else if ((bval & 0xf8) == 0xf0)
len = 4;
else if ((b & 0xfc) == 0xf8)
len = 5;
else if ((b & 0xfe) == 0xfc)
len = 6;
else
len = -1;
@ -1076,12 +1082,11 @@ xo_utf8_to_wc_len (const char *buf)
static ssize_t
xo_buf_utf8_len (xo_handle_t *xop, const char *buf, ssize_t bufsiz)
{
unsigned b = (unsigned char) *buf;
ssize_t len, i;
len = xo_utf8_to_wc_len(buf);
if (len == -1) {
if (len < 0) {
xo_failure(xop, "invalid UTF-8 data: %02hhx", b);
return -1;
}
@ -1119,9 +1124,9 @@ xo_utf8_char (const char *buf, ssize_t len)
wchar_t wc;
const unsigned char *cp = (const unsigned char *) buf;
wc = *cp & xo_utf8_bits[len];
wc = *cp & xo_utf8_data_bits[len];
for (i = 1; i < len; i++) {
wc <<= 6;
wc <<= 6; /* Low six bits have data */
wc |= cp[i] & 0x3f;
if ((cp[i] & 0xc0) != 0x80)
return (wchar_t) -1;
@ -1138,22 +1143,23 @@ xo_utf8_emit_len (wchar_t wc)
{
ssize_t len;
if ((wc & ((1<<7) - 1)) == wc) /* Simple case */
if ((wc & ((1 << 7) - 1)) == wc) /* Simple case */
len = 1;
else if ((wc & ((1<<11) - 1)) == wc)
else if ((wc & ((1 << 11) - 1)) == wc)
len = 2;
else if ((wc & ((1<<16) - 1)) == wc)
else if ((wc & ((1 << 16) - 1)) == wc)
len = 3;
else if ((wc & ((1<<21) - 1)) == wc)
else if ((wc & ((1 << 21) - 1)) == wc)
len = 4;
else if ((wc & ((1<<26) - 1)) == wc)
len = 5;
else
len = 6;
len = -1; /* Invalid */
return len;
}
/*
* Emit a single wide character into the given buffer
*/
static void
xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc)
{
@ -1164,15 +1170,22 @@ xo_utf8_emit_char (char *buf, ssize_t len, wchar_t wc)
return;
}
/* Start with the low bits and insert them, six bits as a time */
for (i = len - 1; i >= 0; i--) {
buf[i] = 0x80 | (wc & 0x3f);
wc >>= 6;
wc >>= 6; /* Drop the low six bits */
}
buf[0] &= xo_utf8_bits[len];
buf[0] |= ~xo_utf8_bits[len] << 1;
/* Finish off the first byte with the length bits */
buf[0] &= xo_utf8_data_bits[len]; /* Clear out the length bits */
buf[0] |= xo_utf8_len_bits[len]; /* Drop in new length bits */
}
/*
* Append a single UTF-8 character to a buffer, converting it to locale
* encoding. Returns the number of columns consumed by that character,
* as best we can determine it.
*/
static ssize_t
xo_buf_append_locale_from_utf8 (xo_handle_t *xop, xo_buffer_t *xbp,
const char *ibuf, ssize_t ilen)
@ -1187,7 +1200,7 @@ xo_buf_append_locale_from_utf8 (xo_handle_t *xop, xo_buffer_t *xbp,
*/
wc = xo_utf8_char(ibuf, ilen);
if (wc == (wchar_t) -1) {
xo_failure(xop, "invalid utf-8 byte sequence");
xo_failure(xop, "invalid UTF-8 byte sequence");
return 0;
}
@ -1216,6 +1229,9 @@ xo_buf_append_locale_from_utf8 (xo_handle_t *xop, xo_buffer_t *xbp,
return xo_wcwidth(wc);
}
/*
* Append a UTF-8 string to a buffer, converting it into locale encoding
*/
static void
xo_buf_append_locale (xo_handle_t *xop, xo_buffer_t *xbp,
const char *cp, ssize_t len)
@ -1846,8 +1862,10 @@ xo_failure (xo_handle_t *xop, const char *fmt, ...)
* Note: normal use of libxo does not require a distinct handle, since
* the default handle (used when NULL is passed) generates text on stdout.
*
* @style Style of output desired (XO_STYLE_* value)
* @flags Set of XOF_* flags in use with this handle
* @param style Style of output desired (XO_STYLE_* value)
* @param flags Set of XOF_* flags in use with this handle
* @return Newly allocated handle
* @see xo_destroy
*/
xo_handle_t *
xo_create (xo_style_t style, xo_xof_flags_t flags)
@ -1869,9 +1887,12 @@ xo_create (xo_style_t style, xo_xof_flags_t flags)
/**
* Create a handle that will write to the given file. Use
* the XOF_CLOSE_FP flag to have the file closed on xo_destroy().
* @fp FILE pointer to use
* @style Style of output desired (XO_STYLE_* value)
* @flags Set of XOF_* flags to use with this handle
*
* @param fp FILE pointer to use
* @param style Style of output desired (XO_STYLE_* value)
* @param flags Set of XOF_* flags to use with this handle
* @return Newly allocated handle
* @see xo_destroy
*/
xo_handle_t *
xo_create_to_file (FILE *fp, xo_style_t style, xo_xof_flags_t flags)
@ -1890,8 +1911,10 @@ xo_create_to_file (FILE *fp, xo_style_t style, xo_xof_flags_t flags)
/**
* Set the default handler to output to a file.
* @xop libxo handle
* @fp FILE pointer to use
*
* @param xop libxo handle
* @param fp FILE pointer to use
* @return 0 on success, non-zero on failure
*/
int
xo_set_file_h (xo_handle_t *xop, FILE *fp)
@ -1913,7 +1936,9 @@ xo_set_file_h (xo_handle_t *xop, FILE *fp)
/**
* Set the default handler to output to a file.
* @fp FILE pointer to use
*
* @param fp FILE pointer to use
* @return 0 on success, non-zero on failure
*/
int
xo_set_file (FILE *fp)
@ -1923,7 +1948,8 @@ xo_set_file (FILE *fp)
/**
* Release any resources held by the handle.
* @xop XO handle to alter (or NULL for default handle)
*
* @param xop XO handle to alter (or NULL for default handle)
*/
void
xo_destroy (xo_handle_t *xop_arg)
@ -1956,8 +1982,8 @@ xo_destroy (xo_handle_t *xop_arg)
* Record a new output style to use for the given handle (or default if
* handle is NULL). This output style will be used for any future output.
*
* @xop XO handle to alter (or NULL for default handle)
* @style new output style (XO_STYLE_*)
* @param xop XO handle to alter (or NULL for default handle)
* @param style new output style (XO_STYLE_*)
*/
void
xo_set_style (xo_handle_t *xop, xo_style_t style)
@ -1966,6 +1992,12 @@ xo_set_style (xo_handle_t *xop, xo_style_t style)
xop->xo_style = style;
}
/**
* Return the current style of a handle
*
* @param xop XO handle to access
* @return The handle's current style
*/
xo_style_t
xo_get_style (xo_handle_t *xop)
{
@ -1973,6 +2005,12 @@ xo_get_style (xo_handle_t *xop)
return xo_style(xop);
}
/**
* Return the XO_STYLE_* value matching a given name
*
* @param name String name of a style
* @return XO_STYLE_* value
*/
static int
xo_name_to_style (const char *name)
{
@ -2008,8 +2046,8 @@ xo_style_is_encoding (xo_handle_t *xop)
/* Simple name-value mapping */
typedef struct xo_mapping_s {
xo_xff_flags_t xm_value;
const char *xm_name;
xo_xff_flags_t xm_value; /* Flag value */
const char *xm_name; /* String name */
} xo_mapping_t;
static xo_xff_flags_t
@ -2056,6 +2094,7 @@ xo_value_lookup (xo_mapping_t *map, xo_xff_flags_t value)
static xo_mapping_t xo_xof_names[] = {
{ XOF_COLOR_ALLOWED, "color" },
{ XOF_COLOR, "color-force" },
{ XOF_COLUMNS, "columns" },
{ XOF_DTRT, "dtrt" },
{ XOF_FLUSH, "flush" },
@ -2080,6 +2119,21 @@ static xo_mapping_t xo_xof_names[] = {
{ 0, NULL }
};
/* Options available via the environment variable ($LIBXO_OPTIONS) */
static xo_mapping_t xo_xof_simple_names[] = {
{ XOF_COLOR_ALLOWED, "color" },
{ XOF_FLUSH, "flush" },
{ XOF_FLUSH_LINE, "flush-line" },
{ XOF_NO_HUMANIZE, "no-humanize" },
{ XOF_NO_LOCALE, "no-locale" },
{ XOF_RETAIN_NONE, "no-retain" },
{ XOF_PRETTY, "pretty" },
{ XOF_RETAIN_ALL, "retain" },
{ XOF_UNDERSCORES, "underscores" },
{ XOF_WARN, "warn" },
{ 0, NULL }
};
/*
* Convert string name to XOF_* flag value.
* Not all are useful. Or safe. Or sane.
@ -2090,6 +2144,13 @@ xo_name_to_flag (const char *name)
return (unsigned) xo_name_lookup(xo_xof_names, name, -1);
}
/**
* Set the style of an libxo handle based on a string name
*
* @param xop XO handle
* @param name String value of name
* @return 0 on success, non-zero on failure
*/
int
xo_set_style_name (xo_handle_t *xop, const char *name)
{
@ -2105,9 +2166,95 @@ xo_set_style_name (xo_handle_t *xop, const char *name)
}
/*
* Fill in the color map, based on the input string; currently unimplemented
* Look for something like "colors=red/blue+green/yellow" as fg/bg pairs.
*/
static void
xo_set_color_map (xo_handle_t *xop, char *value)
{
#ifdef LIBXO_TEXT_ONLY
return;
#endif /* LIBXO_TEXT_ONLY */
char *cp, *ep, *vp, *np;
ssize_t len = value ? strlen(value) + 1 : 0;
int num = 1, fg, bg;
for (cp = value, ep = cp + len - 1; cp && *cp && cp < ep; cp = np) {
np = strchr(cp, '+');
if (np)
*np++ = '\0';
vp = strchr(cp, '/');
if (vp)
*vp++ = '\0';
fg = *cp ? xo_color_find(cp) : -1;
bg = (vp && *vp) ? xo_color_find(vp) : -1;
xop->xo_color_map_fg[num] = (fg < 0) ? num : fg;
xop->xo_color_map_bg[num] = (bg < 0) ? num : bg;
if (++num > XO_NUM_COLORS)
break;
}
/* If no color initialization happened, then we don't need the map */
if (num > 0)
XOF_SET(xop, XOF_COLOR_MAP);
else
XOF_CLEAR(xop, XOF_COLOR_MAP);
/* Fill in the rest of the colors with the defaults */
for ( ; num < XO_NUM_COLORS; num++)
xop->xo_color_map_fg[num] = xop->xo_color_map_bg[num] = num;
}
static int
xo_set_options_simple (xo_handle_t *xop, const char *input)
{
xo_xof_flags_t new_flag;
char *cp, *ep, *vp, *np, *bp;
ssize_t len = strlen(input) + 1;
bp = alloca(len);
memcpy(bp, input, len);
for (cp = bp, ep = cp + len - 1; cp && cp < ep; cp = np) {
np = strchr(cp, ',');
if (np)
*np++ = '\0';
vp = strchr(cp, '=');
if (vp)
*vp++ = '\0';
if (strcmp("colors", cp) == 0) {
xo_set_color_map(xop, vp);
continue;
}
new_flag = xo_name_lookup(xo_xof_simple_names, cp, -1);
if (new_flag != 0) {
XOF_SET(xop, new_flag);
} else if (strcmp(cp, "no-color") == 0) {
XOF_CLEAR(xop, XOF_COLOR_ALLOWED);
} else {
xo_failure(xop, "unknown simple option: %s", cp);
return -1;
}
}
return 0;
}
/**
* Set the options for a handle using a string of options
* passed in. The input is a comma-separated set of names
* and optional values: "xml,pretty,indent=4"
*
* @param xop XO handle
* @param input Comma-separated set of option values
* @return 0 on success, non-zero on failure
*/
int
xo_set_options (xo_handle_t *xop, const char *input)
@ -2227,7 +2374,7 @@ xo_set_options (xo_handle_t *xop, const char *input)
*vp++ = '\0';
if (strcmp("colors", cp) == 0) {
/* XXX Look for colors=red-blue+green-yellow */
xo_set_color_map(xop, vp);
continue;
}
@ -2245,28 +2392,26 @@ xo_set_options (xo_handle_t *xop, const char *input)
new_flag = xo_name_to_flag(cp);
if (new_flag != 0)
XOF_SET(xop, new_flag);
else {
if (strcmp(cp, "no-color") == 0) {
XOF_CLEAR(xop, XOF_COLOR_ALLOWED);
} else if (strcmp(cp, "indent") == 0) {
if (vp)
xop->xo_indent_by = atoi(vp);
else
xo_failure(xop, "missing value for indent option");
} else if (strcmp(cp, "encoder") == 0) {
if (vp == NULL)
xo_failure(xop, "missing value for encoder option");
else {
if (xo_encoder_init(xop, vp)) {
xo_failure(xop, "encoder not found: %s", vp);
rc = -1;
}
else if (strcmp(cp, "no-color") == 0)
XOF_CLEAR(xop, XOF_COLOR_ALLOWED);
else if (strcmp(cp, "indent") == 0) {
if (vp)
xop->xo_indent_by = atoi(vp);
else
xo_failure(xop, "missing value for indent option");
} else if (strcmp(cp, "encoder") == 0) {
if (vp == NULL)
xo_failure(xop, "missing value for encoder option");
else {
if (xo_encoder_init(xop, vp)) {
xo_failure(xop, "encoder not found: %s", vp);
rc = -1;
}
} else {
xo_warnx("unknown libxo option value: '%s'", cp);
rc = -1;
}
} else {
xo_warnx("unknown libxo option value: '%s'", cp);
rc = -1;
}
}
}
@ -2281,8 +2426,8 @@ xo_set_options (xo_handle_t *xop, const char *input)
* Set one or more flags for a given handle (or default if handle is NULL).
* These flags will affect future output.
*
* @xop XO handle to alter (or NULL for default handle)
* @flags Flags to be set (XOF_*)
* @param xop XO handle to alter (or NULL for default handle)
* @param flags Flags to be set (XOF_*)
*/
void
xo_set_flags (xo_handle_t *xop, xo_xof_flags_t flags)
@ -2292,6 +2437,11 @@ xo_set_flags (xo_handle_t *xop, xo_xof_flags_t flags)
XOF_SET(xop, flags);
}
/**
* Accessor to return the current set of flags for a handle
* @param xop XO handle
* @return Current set of flags
*/
xo_xof_flags_t
xo_get_flags (xo_handle_t *xop)
{
@ -2300,8 +2450,8 @@ xo_get_flags (xo_handle_t *xop)
return xop->xo_flags;
}
/*
* strndup with a twist: len < 0 means strlen
/**
* strndup with a twist: len < 0 means len = strlen(str)
*/
static char *
xo_strndup (const char *str, ssize_t len)
@ -2323,8 +2473,8 @@ xo_strndup (const char *str, ssize_t len)
* generated data to be placed within an XML hierarchy but still have
* accurate XPath expressions.
*
* @xop XO handle to alter (or NULL for default handle)
* @path The XPath expression
* @param xop XO handle to alter (or NULL for default handle)
* @param path The XPath expression
*/
void
xo_set_leading_xpath (xo_handle_t *xop, const char *path)
@ -2345,9 +2495,9 @@ xo_set_leading_xpath (xo_handle_t *xop, const char *path)
/**
* Record the info data for a set of tags
*
* @xop XO handle to alter (or NULL for default handle)
* @info Info data (xo_info_t) to be recorded (or NULL) (MUST BE SORTED)
* @count Number of entries in info (or -1 to count them ourselves)
* @param xop XO handle to alter (or NULL for default handle)
* @param info Info data (xo_info_t) to be recorded (or NULL) (MUST BE SORTED)
* @pararm count Number of entries in info (or -1 to count them ourselves)
*/
void
xo_set_info (xo_handle_t *xop, xo_info_t *infop, int count)
@ -2384,8 +2534,8 @@ xo_set_formatter (xo_handle_t *xop, xo_formatter_t func,
* Clear one or more flags for a given handle (or default if handle is NULL).
* These flags will affect future output.
*
* @xop XO handle to alter (or NULL for default handle)
* @flags Flags to be cleared (XOF_*)
* @param xop XO handle to alter (or NULL for default handle)
* @param flags Flags to be cleared (XOF_*)
*/
void
xo_clear_flags (xo_handle_t *xop, xo_xof_flags_t flags)
@ -3077,6 +3227,11 @@ xo_data_append_content (xo_handle_t *xop, const char *str, ssize_t len,
xop->xo_anchor_columns += cols;
}
/**
* Bump one of the 'width' values in a format strings (e.g. "%40.50.60s").
* @param xfp Formatting instructions
* @param digit Single digit (0-9) of input
*/
static void
xo_bump_width (xo_format_t *xfp, int digit)
{
@ -3323,7 +3478,8 @@ xo_do_format_field (xo_handle_t *xop, xo_buffer_t *xbp,
rc = xo_trim_ws(xbp, rc);
} else {
ssize_t columns = rc = xo_vsnprintf(xop, xbp, newfmt, xop->xo_vap);
ssize_t columns = rc = xo_vsnprintf(xop, xbp, newfmt,
xop->xo_vap);
/*
* For XML and HTML, we need "&<>" processing; for JSON,
@ -4324,7 +4480,7 @@ xo_format_value (xo_handle_t *xop, const char *name, ssize_t nlen,
xo_encoder_handle(xop, quote ? XO_OP_STRING : XO_OP_CONTENT,
xo_buf_data(&xop->xo_data, name_offset),
xo_buf_data(&xop->xo_data, value_offset));
xo_buf_data(&xop->xo_data, value_offset), flags);
xo_buf_reset(&xop->xo_data);
break;
}
@ -4581,6 +4737,28 @@ xo_colors_enabled (xo_handle_t *xop UNUSED)
#endif /* LIBXO_TEXT_ONLY */
}
/*
* If the color map is in use (--libxo colors=xxxx), then update
* the incoming foreground and background colors from the map.
*/
static void
xo_colors_update (xo_handle_t *xop, xo_colors_t *newp)
{
#ifdef LIBXO_TEXT_ONLY
return;
#endif /* LIBXO_TEXT_ONLY */
xo_color_t fg = newp->xoc_col_fg;
if (XOF_ISSET(xop, XOF_COLOR_MAP) && fg < XO_NUM_COLORS)
fg = xop->xo_color_map_fg[fg]; /* Fetch from color map */
newp->xoc_col_fg = fg;
xo_color_t bg = newp->xoc_col_bg;
if (XOF_ISSET(xop, XOF_COLOR_MAP) && bg < XO_NUM_COLORS)
bg = xop->xo_color_map_bg[bg]; /* Fetch from color map */
newp->xoc_col_bg = bg;
}
static void
xo_colors_handle_text (xo_handle_t *xop, xo_colors_t *newp)
{
@ -4627,16 +4805,16 @@ xo_colors_handle_text (xo_handle_t *xop, xo_colors_t *newp)
}
}
if (newp->xoc_col_fg != oldp->xoc_col_fg) {
xo_color_t fg = newp->xoc_col_fg;
if (fg != oldp->xoc_col_fg) {
cp += snprintf(cp, ep - cp, ";3%u",
(newp->xoc_col_fg != XO_COL_DEFAULT)
? newp->xoc_col_fg - 1 : 9);
(fg != XO_COL_DEFAULT) ? fg - 1 : 9);
}
if (newp->xoc_col_bg != oldp->xoc_col_bg) {
xo_color_t bg = newp->xoc_col_bg;
if (bg != oldp->xoc_col_bg) {
cp += snprintf(cp, ep - cp, ";4%u",
(newp->xoc_col_bg != XO_COL_DEFAULT)
? newp->xoc_col_bg - 1 : 9);
(bg != XO_COL_DEFAULT) ? bg - 1 : 9);
}
if (cp - buf != 1 && cp < ep - 3) {
@ -4736,6 +4914,7 @@ xo_format_colors (xo_handle_t *xop, xo_field_info_t *xfip,
xo_colors_t xoc = xop->xo_colors;
xo_colors_parse(xop, &xoc, xb.xb_bufp);
xo_colors_update(xop, &xoc);
if (xo_style(xop) == XO_STYLE_TEXT) {
/*
@ -5837,12 +6016,12 @@ xo_gettext_build_format (xo_handle_t *xop,
if (gtfmt == NULL || gtfmt == fmt || strcmp(gtfmt, fmt) == 0)
goto bail2;
xo_buf_cleanup(&xb);
char *new_fmt = xo_strndup(gtfmt, -1);
if (new_fmt == NULL)
goto bail2;
xo_buf_cleanup(&xb);
*new_fmtp = new_fmt;
return new_fmt;
@ -5975,7 +6154,7 @@ xo_do_emit_fields (xo_handle_t *xop, xo_field_info_t *fields,
ssize_t fend[flimit];
bzero(fend, flimit * sizeof(fend[0]));
for (xfip = fields, field = 0; xfip->xfi_ftype && field < max_fields;
for (xfip = fields, field = 0; field < max_fields && xfip->xfi_ftype;
xfip++, field++) {
ftype = xfip->xfi_ftype;
flags = xfip->xfi_flags;
@ -6458,7 +6637,7 @@ xo_attr_hv (xo_handle_t *xop, const char *name, const char *fmt, va_list vap)
*xbp->xb_curp = '\0';
rc = xo_encoder_handle(xop, XO_OP_ATTRIBUTE,
xo_buf_data(xbp, name_offset),
xo_buf_data(xbp, value_offset));
xo_buf_data(xbp, value_offset), 0);
}
}
@ -6536,7 +6715,7 @@ xo_depth_change (xo_handle_t *xop, const char *name,
xo_stack_t *xsp = &xop->xo_stack[xop->xo_depth];
if (XOF_ISSET(xop, XOF_WARN)) {
const char *top = xsp->xs_name;
if (top && strcmp(name, top) != 0) {
if (top != NULL && name != NULL && strcmp(name, top) != 0) {
xo_failure(xop, "incorrect close: '%s' .vs. '%s'",
name, top);
return;
@ -6648,7 +6827,7 @@ xo_do_open_container (xo_handle_t *xop, xo_xof_flags_t flags, const char *name)
break;
case XO_STYLE_ENCODER:
rc = xo_encoder_handle(xop, XO_OP_OPEN_CONTAINER, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_OPEN_CONTAINER, name, NULL, flags);
break;
}
@ -6738,7 +6917,7 @@ xo_do_close_container (xo_handle_t *xop, const char *name)
case XO_STYLE_ENCODER:
xo_depth_change(xop, name, -1, 0, XSS_CLOSE_CONTAINER, 0);
rc = xo_encoder_handle(xop, XO_OP_CLOSE_CONTAINER, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_CLOSE_CONTAINER, name, NULL, 0);
break;
}
@ -6804,7 +6983,7 @@ xo_do_open_list (xo_handle_t *xop, xo_xsf_flags_t flags, const char *name)
break;
case XO_STYLE_ENCODER:
rc = xo_encoder_handle(xop, XO_OP_OPEN_LIST, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_OPEN_LIST, name, NULL, flags);
break;
}
@ -6879,7 +7058,7 @@ xo_do_close_list (xo_handle_t *xop, const char *name)
case XO_STYLE_ENCODER:
xo_depth_change(xop, name, -1, 0, XSS_CLOSE_LIST, XSF_LIST);
rc = xo_encoder_handle(xop, XO_OP_CLOSE_LIST, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_CLOSE_LIST, name, NULL, 0);
break;
default:
@ -6953,7 +7132,7 @@ xo_do_open_leaf_list (xo_handle_t *xop, xo_xsf_flags_t flags, const char *name)
break;
case XO_STYLE_ENCODER:
rc = xo_encoder_handle(xop, XO_OP_OPEN_LEAF_LIST, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_OPEN_LEAF_LIST, name, NULL, flags);
break;
}
@ -6997,7 +7176,7 @@ xo_do_close_leaf_list (xo_handle_t *xop, const char *name)
break;
case XO_STYLE_ENCODER:
rc = xo_encoder_handle(xop, XO_OP_CLOSE_LEAF_LIST, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_CLOSE_LEAF_LIST, name, NULL, 0);
/* FALLTHRU */
default:
@ -7054,7 +7233,7 @@ xo_do_open_instance (xo_handle_t *xop, xo_xsf_flags_t flags, const char *name)
break;
case XO_STYLE_ENCODER:
rc = xo_encoder_handle(xop, XO_OP_OPEN_INSTANCE, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_OPEN_INSTANCE, name, NULL, flags);
break;
}
@ -7142,7 +7321,7 @@ xo_do_close_instance (xo_handle_t *xop, const char *name)
case XO_STYLE_ENCODER:
xo_depth_change(xop, name, -1, 0, XSS_CLOSE_INSTANCE, 0);
rc = xo_encoder_handle(xop, XO_OP_CLOSE_INSTANCE, name, NULL);
rc = xo_encoder_handle(xop, XO_OP_CLOSE_INSTANCE, name, NULL, 0);
break;
}
@ -7618,7 +7797,7 @@ xo_flush_h (xo_handle_t *xop)
switch (xo_style(xop)) {
case XO_STYLE_ENCODER:
xo_encoder_handle(xop, XO_OP_FLUSH, NULL, NULL);
xo_encoder_handle(xop, XO_OP_FLUSH, NULL, NULL, 0);
}
rc = xo_write(xop);
@ -7656,7 +7835,7 @@ xo_finish_h (xo_handle_t *xop)
break;
case XO_STYLE_ENCODER:
xo_encoder_handle(xop, XO_OP_FINISH, NULL, NULL);
xo_encoder_handle(xop, XO_OP_FINISH, NULL, NULL, 0);
break;
}
@ -7779,6 +7958,8 @@ xo_parse_args (int argc, char **argv)
if (cp)
xo_program = cp + 1;
xo_handle_t *xop = xo_default(NULL);
for (save = i = 1; i < argc; i++) {
if (argv[i] == NULL
|| strncmp(argv[i], libxo_opt, sizeof(libxo_opt) - 1) != 0) {
@ -7796,14 +7977,14 @@ xo_parse_args (int argc, char **argv)
return -1;
}
if (xo_set_options(NULL, cp) < 0)
if (xo_set_options(xop, cp) < 0)
return -1;
} else if (*cp == ':') {
if (xo_set_options(NULL, cp) < 0)
if (xo_set_options(xop, cp) < 0)
return -1;
} else if (*cp == '=') {
if (xo_set_options(NULL, ++cp) < 0)
if (xo_set_options(xop, ++cp) < 0)
return -1;
} else if (*cp == '-') {
@ -7821,6 +8002,13 @@ xo_parse_args (int argc, char **argv)
}
}
/*
* We only want to do color output on terminals, but we only want
* to do this if the user has asked for color.
*/
if (XOF_ISSET(xop, XOF_COLOR_ALLOWED) && isatty(1))
XOF_SET(xop, XOF_COLOR);
argv[save] = NULL;
return save;
}
@ -7882,7 +8070,7 @@ xo_set_version_h (xo_handle_t *xop, const char *version)
break;
case XO_STYLE_ENCODER:
xo_encoder_handle(xop, XO_OP_VERSION, NULL, version);
xo_encoder_handle(xop, XO_OP_VERSION, NULL, version, 0);
break;
}
}

View File

@ -101,6 +101,8 @@ typedef unsigned long long xo_xof_flags_t;
#define XOF_RETAIN_ALL XOF_BIT(30) /** Force use of XOEF_RETAIN */
#define XOF_RETAIN_NONE XOF_BIT(31) /** Prevent use of XOEF_RETAIN */
#define XOF_COLOR_MAP XOF_BIT(32) /** Color map has been initialized */
typedef unsigned xo_emit_flags_t; /* Flags to xo_emit() and friends */
#define XOEF_RETAIN (1<<0) /* Retain parsed formatting information */

View File

@ -133,7 +133,7 @@ xo_buf_has_room (xo_buffer_t *xbp, ssize_t len)
static inline void
xo_buf_append (xo_buffer_t *xbp, const char *str, ssize_t len)
{
if (!xo_buf_has_room(xbp, len))
if (str == NULL || len == 0 || !xo_buf_has_room(xbp, len))
return;
memcpy(xbp->xb_curp, str, len);

View File

@ -308,7 +308,7 @@ xo_encoder_init (xo_handle_t *xop, const char *name)
xo_set_encoder(xop, xep->xe_handler);
return xo_encoder_handle(xop, XO_OP_CREATE, NULL, NULL);
return xo_encoder_handle(xop, XO_OP_CREATE, NULL, NULL, 0);
}
/*
@ -334,7 +334,7 @@ xo_encoder_create (const char *name, xo_xof_flags_t flags)
int
xo_encoder_handle (xo_handle_t *xop, xo_encoder_op_t op,
const char *name, const char *value)
const char *name, const char *value, xo_xof_flags_t flags)
{
void *private = xo_get_private(xop);
xo_encoder_func_t func = xo_get_encoder(xop);
@ -342,7 +342,7 @@ xo_encoder_handle (xo_handle_t *xop, xo_encoder_op_t op,
if (func == NULL)
return -1;
return func(xop, op, name, value, private);
return func(xop, op, name, value, private, flags);
}
const char *

View File

@ -50,7 +50,8 @@ typedef unsigned xo_encoder_op_t;
xo_encoder_op_t op __attribute__ ((__unused__)), \
const char *name __attribute__ ((__unused__)), \
const char *value __attribute__ ((__unused__)), \
void *private __attribute__ ((__unused__))
void *private __attribute__ ((__unused__)), \
xo_xof_flags_t flags __attribute__ ((__unused__))
typedef int (*xo_encoder_func_t)(XO_ENCODER_HANDLER_ARGS);
@ -105,7 +106,7 @@ xo_encoder_create (const char *name, xo_xof_flags_t flags);
int
xo_encoder_handle (xo_handle_t *xop, xo_encoder_op_t op,
const char *name, const char *value);
const char *name, const char *value, xo_xof_flags_t flags);
void
xo_encoders_clean (void);

View File

@ -176,8 +176,8 @@ xo_send_syslog (char *full_msg, char *v0_hdr,
int fd;
int full_len = strlen(full_msg);
/* Output to stderr if requested. */
if (xo_logstat & LOG_PERROR) {
/* Output to stderr if requested, then we've been passed a v0 header */
if (v0_hdr) {
struct iovec iov[3];
struct iovec *v = iov;
char newline[] = "\n";

View File

@ -66,7 +66,9 @@ EXTRA_DIST = \
${addprefix saved/, ${TEST_CASES:.c=.H.err}} \
${addprefix saved/, ${TEST_CASES:.c=.H.out}} \
${addprefix saved/, ${TEST_CASES:.c=.HIPx.err}} \
${addprefix saved/, ${TEST_CASES:.c=.HIPx.out}}
${addprefix saved/, ${TEST_CASES:.c=.HIPx.out}} \
${addprefix saved/, ${TEST_CASES:.c=.E.err}} \
${addprefix saved/, ${TEST_CASES:.c=.E.out}}
S2O = | ${SED} '1,/@@/d'
@ -79,17 +81,11 @@ valgrind:
#TEST_TRACE = set -x ;
TEST_JIG = \
${CHECKER} ./$$base.test ${TEST_OPTS} \
${CHECKER} ./$$base.test --libxo$$xoopts ${TEST_OPTS} \
> out/$$base.$$fmt.out 2> out/$$base.$$fmt.err ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.out out/$$base.$$fmt.out ${S2O} ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.err out/$$base.$$fmt.err ${S2O}
TEST_ONE = \
LIBXO_OPTIONS=:W$$fmt ${TEST_JIG}
TEST_TWO = \
LIBXO_OPTIONS=warn,encoder=test ${TEST_JIG}
TEST_FORMATS = T XP JP HP X J H HIPx
test tests: ${bin_PROGRAMS}
@ -98,12 +94,14 @@ test tests: ${bin_PROGRAMS}
base=`${BASENAME} $$test .c` ; \
(for fmt in ${TEST_FORMATS}; do \
echo "... $$test ... $$fmt ..."; \
${TEST_ONE}; \
xoopts=:W$$fmt ; \
${TEST_JIG}; \
true; \
done) ; \
(for fmt in E; do \
echo "... $$test ... $$fmt ..."; \
${TEST_TWO}; \
xoopts==warn,encoder=test ; \
${TEST_JIG}; \
true; \
done) \
done)

View File

@ -1,139 +1,139 @@
op create: [] []
op open_container: [top] []
op content: [kve_start] [0xdeadbeef]
op content: [kve_end] [0xcabb1e]
op string: [host] [my-box]
op string: [domain] [example.com]
op string: [host] [my-box]
op string: [domain] [example.com]
op string: [label] [value]
op string: [max-chaos] [very]
op content: [min-chaos] [42]
op string: [some-chaos] [[42]]
op string: [host] [my-box]
op string: [domain] [example.com]
op attr: [test] [value]
op open_container: [data] []
op open_list: [item] []
op attr: [test2] [value2]
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [GRO-000-415]
op string: [name] [gum]
op content: [sold] [1412]
op content: [in-stock] [54]
op content: [on-order] [10]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [HRD-000-212]
op string: [name] [rope]
op content: [sold] [85]
op content: [in-stock] [4]
op content: [on-order] [2]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [HRD-000-517]
op string: [name] [ladder]
op content: [sold] [0]
op content: [in-stock] [2]
op content: [on-order] [1]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [HRD-000-632]
op string: [name] [bolt]
op content: [sold] [4123]
op content: [in-stock] [144]
op content: [on-order] [42]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [GRO-000-2331]
op string: [name] [water]
op content: [sold] [17]
op content: [in-stock] [14]
op content: [on-order] [2]
op close_instance: [item] []
op close_list: [item] []
op close_container: [data] []
op open_container: [data2] []
op open_list: [item] []
op open_instance: [item] []
op string: [sku] [GRO-000-415]
op string: [name] [gum]
op content: [sold] [1412.0]
op content: [in-stock] [54]
op content: [on-order] [10]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [HRD-000-212]
op string: [name] [rope]
op content: [sold] [85.0]
op content: [in-stock] [4]
op content: [on-order] [2]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [HRD-000-517]
op string: [name] [ladder]
op content: [sold] [0]
op content: [in-stock] [2]
op content: [on-order] [1]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [HRD-000-632]
op string: [name] [bolt]
op content: [sold] [4123.0]
op content: [in-stock] [144]
op content: [on-order] [42]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [GRO-000-2331]
op string: [name] [water]
op content: [sold] [17.0]
op content: [in-stock] [14]
op content: [on-order] [2]
op close_instance: [item] []
op close_list: [item] []
op close_container: [data2] []
op open_container: [data3] []
op open_list: [item] []
op open_instance: [item] []
op string: [sku] [GRO-000-533]
op string: [name] [fish]
op content: [sold] [1321.0]
op content: [in-stock] [45]
op content: [on-order] [1]
op close_instance: [item] []
op close_list: [item] []
op close_container: [data3] []
op open_container: [data4] []
op open_list: [item] []
op attr: [test4] [value4]
op string: [item] [gum]
op attr: [test4] [value4]
op string: [item] [rope]
op attr: [test4] [value4]
op string: [item] [ladder]
op attr: [test4] [value4]
op string: [item] [bolt]
op attr: [test4] [value4]
op string: [item] [water]
op close_list: [item] []
op close_container: [data4] []
op content: [cost] [425]
op content: [cost] [455]
op string: [mode] [mode]
op string: [mode_octal] [octal]
op string: [links] [links]
op string: [user] [user]
op string: [group] [group]
op string: [mode] [/some/file]
op content: [mode_octal] [640]
op content: [links] [1]
op string: [user] [user]
op string: [group] [group]
op close_container: [top] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [top] [] [0x810]
op content: [kve_start] [0xdeadbeef] [0x8]
op content: [kve_end] [0xcabb1e] [0x8]
op string: [host] [my-box] [0x200000]
op string: [domain] [example.com] [0x200000]
op string: [host] [my-box] [0x200008]
op string: [domain] [example.com] [0x200000]
op string: [label] [value] [0x200000]
op string: [max-chaos] [very] [0x1000]
op content: [min-chaos] [42] [0]
op string: [some-chaos] [[42]] [0]
op string: [host] [my-box] [0]
op string: [domain] [example.com] [0]
op attr: [test] [value] [0]
op open_container: [data] [] [0x810]
op open_list: [item] [] [0]
op attr: [test2] [value2] [0]
op open_instance: [item] [] [0x810]
op attr: [test3] [value3] [0]
op string: [sku] [GRO-000-415] [0x98]
op string: [name] [gum] [0x80]
op content: [sold] [1412] [0x20]
op content: [in-stock] [54] [0]
op content: [on-order] [10] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op attr: [test3] [value3] [0]
op string: [sku] [HRD-000-212] [0x98]
op string: [name] [rope] [0x80]
op content: [sold] [85] [0x20]
op content: [in-stock] [4] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op attr: [test3] [value3] [0]
op string: [sku] [HRD-000-517] [0x98]
op string: [name] [ladder] [0x80]
op content: [sold] [0] [0x20]
op content: [in-stock] [2] [0]
op content: [on-order] [1] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op attr: [test3] [value3] [0]
op string: [sku] [HRD-000-632] [0x98]
op string: [name] [bolt] [0x80]
op content: [sold] [4123] [0x20]
op content: [in-stock] [144] [0]
op content: [on-order] [42] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op attr: [test3] [value3] [0]
op string: [sku] [GRO-000-2331] [0x98]
op string: [name] [water] [0x80]
op content: [sold] [17] [0x20]
op content: [in-stock] [14] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [data] [] [0]
op open_container: [data2] [] [0x810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [sku] [GRO-000-415] [0x98]
op string: [name] [gum] [0x80]
op content: [sold] [1412.0] [0x20]
op content: [in-stock] [54] [0]
op content: [on-order] [10] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [sku] [HRD-000-212] [0x98]
op string: [name] [rope] [0x80]
op content: [sold] [85.0] [0x20]
op content: [in-stock] [4] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [sku] [HRD-000-517] [0x98]
op string: [name] [ladder] [0x80]
op content: [sold] [0] [0x20]
op content: [in-stock] [2] [0]
op content: [on-order] [1] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [sku] [HRD-000-632] [0x98]
op string: [name] [bolt] [0x80]
op content: [sold] [4123.0] [0x20]
op content: [in-stock] [144] [0]
op content: [on-order] [42] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [sku] [GRO-000-2331] [0x98]
op string: [name] [water] [0x80]
op content: [sold] [17.0] [0x20]
op content: [in-stock] [14] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [data2] [] [0]
op open_container: [data3] [] [0x810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [sku] [GRO-000-533] [0x98]
op string: [name] [fish] [0x80]
op content: [sold] [1321.0] [0x20]
op content: [in-stock] [45] [0]
op content: [on-order] [1] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [data3] [] [0]
op open_container: [data4] [] [0x810]
op open_list: [item] [] [0]
op attr: [test4] [value4] [0]
op string: [item] [gum] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [rope] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [ladder] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [bolt] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [water] [0x2000]
op close_list: [item] [] [0]
op close_container: [data4] [] [0]
op content: [cost] [425] [0]
op content: [cost] [455] [0]
op string: [mode] [mode] [0x8]
op string: [mode_octal] [octal] [0x8]
op string: [links] [links] [0x1000]
op string: [user] [user] [0x1000]
op string: [group] [group] [0x1000]
op string: [mode] [/some/file] [0x1000]
op content: [mode_octal] [640] [0x8]
op content: [links] [1] [0x1000]
op string: [user] [user] [0x1000]
op string: [group] [group] [0x1000]
op close_container: [top] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,68 +1,68 @@
op create: [] []
op open_container: [top] []
op open_container: [data] []
op string: [what] [braces]
op string: [length] [abcdef]
op content: [fd] [-1]
op string: [error] [Bad file descriptor]
op string: [test] [good]
op content: [fd] [-1]
op string: [error] [Bad fi]
op string: [test] [good]
op content: [lines] [20]
op content: [words] [30]
op content: [characters] [40]
op open_leaf_list: [bytes] []
op content: [bytes] [0]
op content: [bytes] [1]
op content: [bytes] [2]
op content: [bytes] [3]
op content: [bytes] [4]
op close_leaf_list: [bytes] []
op content: [mbuf-current] [10]
op content: [mbuf-cache] [20]
op content: [mbuf-total] [30]
op content: [distance] [50]
op string: [location] [Boston]
op content: [memory] [64]
op content: [total] [640]
op content: [memory] [64]
op content: [total] [640]
op content: [ten] [10]
op content: [eleven] [11]
op content: [unknown] [1010]
op content: [unknown] [1010]
op content: [min] [15]
op content: [cur] [20]
op content: [max] [30]
op content: [min] [15]
op content: [cur] [20]
op content: [max] [125]
op content: [min] [15]
op content: [cur] [20]
op content: [max] [125]
op content: [min] [15]
op content: [cur] [20]
op content: [max] [125]
op content: [val1] [21]
op content: [val2] [58368]
op content: [val3] [100663296]
op content: [val4] [44470272]
op content: [val5] [1342172800]
op open_list: [flag] []
op string: [flag] [one]
op string: [flag] [two]
op string: [flag] [three]
op close_list: [flag] []
op content: [works] [null]
op content: [empty-tag] [true]
op string: [t1] [1000]
op string: [t2] [test5000]
op string: [t3] [ten-longx]
op string: [t4] [xtest]
op content: [count] [10]
op content: [test] [4]
op close_container: [data] []
op close_container: [top] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [top] [] [0x40010]
op open_container: [data] [] [0x40010]
op string: [what] [braces] [0]
op string: [length] [abcdef] [0]
op content: [fd] [-1] [0]
op string: [error] [Bad file descriptor] [0]
op string: [test] [good] [0]
op content: [fd] [-1] [0]
op string: [error] [Bad fi] [0]
op string: [test] [good] [0]
op content: [lines] [20] [0]
op content: [words] [30] [0]
op content: [characters] [40] [0]
op open_leaf_list: [bytes] [] [0]
op content: [bytes] [0] [0x2004]
op content: [bytes] [1] [0x2004]
op content: [bytes] [2] [0x2004]
op content: [bytes] [3] [0x2004]
op content: [bytes] [4] [0x2004]
op close_leaf_list: [bytes] [] [0]
op content: [mbuf-current] [10] [0]
op content: [mbuf-cache] [20] [0]
op content: [mbuf-total] [30] [0]
op content: [distance] [50] [0]
op string: [location] [Boston] [0]
op content: [memory] [64] [0]
op content: [total] [640] [0]
op content: [memory] [64] [0]
op content: [total] [640] [0]
op content: [ten] [10] [0]
op content: [eleven] [11] [0]
op content: [unknown] [1010] [0]
op content: [unknown] [1010] [0]
op content: [min] [15] [0x20]
op content: [cur] [20] [0x20]
op content: [max] [30] [0]
op content: [min] [15] [0]
op content: [cur] [20] [0]
op content: [max] [125] [0]
op content: [min] [15] [0x20]
op content: [cur] [20] [0x20]
op content: [max] [125] [0x20]
op content: [min] [15] [0]
op content: [cur] [20] [0]
op content: [max] [125] [0]
op content: [val1] [21] [0x8000]
op content: [val2] [58368] [0x18000]
op content: [val3] [100663296] [0x28000]
op content: [val4] [44470272] [0x48000]
op content: [val5] [1342172800] [0x28000]
op open_list: [flag] [] [0]
op string: [flag] [one] [0x2010]
op string: [flag] [two] [0x2010]
op string: [flag] [three] [0x2010]
op close_list: [flag] [] [0]
op content: [works] [null] [0x20]
op content: [empty-tag] [true] [0x8]
op string: [t1] [1000] [0x1010]
op string: [t2] [test5000] [0x1010]
op string: [t3] [ten-longx] [0x1010]
op string: [t4] [xtest] [0x1010]
op content: [count] [10] [0]
op content: [test] [4] [0]
op close_container: [data] [] [0]
op close_container: [top] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,34 +1,34 @@
op create: [] []
op open_container: [employees] []
op open_list: [employee] []
op close_list: [employee] []
op string: [extra] []
op open_list: [memory] []
op open_instance: [memory] []
op string: [type] [name]
op content: [in-use] [12345]
op content: [memory-use] [54321]
op string: [high-use] [-]
op content: [requests] [32145]
op close_instance: [memory] []
op close_list: [memory] []
op open_list: [employee] []
op open_instance: [employee] []
op string: [first-name] [Terry]
op string: [last-name] [Jones]
op content: [department] [660]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Leslie]
op string: [last-name] [Patterson]
op content: [department] [341]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Ashley]
op string: [last-name] [Smith]
op content: [department] [1440]
op close_instance: [employee] []
op close_list: [employee] []
op close_container: [employees] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [employees] [] [0x10]
op open_list: [employee] [] [0]
op close_list: [employee] [] [0]
op string: [extra] [] [0]
op open_list: [memory] [] [0]
op open_instance: [memory] [] [0x10]
op string: [type] [name] [0x80]
op content: [in-use] [12345] [0]
op content: [memory-use] [54321] [0]
op string: [high-use] [-] [0]
op content: [requests] [32145] [0]
op close_instance: [memory] [] [0]
op close_list: [memory] [] [0]
op open_list: [employee] [] [0]
op open_instance: [employee] [] [0x10]
op string: [first-name] [Terry] [0]
op string: [last-name] [Jones] [0]
op content: [department] [660] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x10]
op string: [first-name] [Leslie] [0]
op string: [last-name] [Patterson] [0]
op content: [department] [341] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x10]
op string: [first-name] [Ashley] [0]
op string: [last-name] [Smith] [0]
op content: [department] [1440] [0]
op close_instance: [employee] [] [0]
op close_list: [employee] [] [0]
op close_container: [employees] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,22 +1,22 @@
op create: [] []
op open_container: [employees] []
op open_list: [employee] []
op open_instance: [employee] []
op string: [first-name] [Terry]
op string: [last-name] [Jones]
op content: [department] [660]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Leslie]
op string: [last-name] [Patterson]
op content: [department] [341]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Ashley]
op string: [last-name] [Smith]
op content: [department] [1440]
op close_instance: [employee] []
op close_list: [employee] []
op close_container: [employees] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [employees] [] [0x10]
op open_list: [employee] [] [0]
op open_instance: [employee] [] [0x10]
op string: [first-name] [Terry] [0]
op string: [last-name] [Jones] [0]
op content: [department] [660] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x10]
op string: [first-name] [Leslie] [0]
op string: [last-name] [Patterson] [0]
op content: [department] [341] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x10]
op string: [first-name] [Ashley] [0]
op string: [last-name] [Smith] [0]
op content: [department] [1440] [0]
op close_instance: [employee] [] [0]
op close_list: [employee] [] [0]
op close_container: [employees] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,96 +1,96 @@
op create: [] []
op open_container: [indian-languages] []
op string: [gurmukhi] [ਲਹੌਰ ਪਾਕਿਸਤਾਨੀ ਪੰਜਾਬ ਦੀ ਰਾਜਧਾਨੀ ਹੈ । ਲੋਕ ਗਿਣਤੀ ਦੇ ਨਾਲ ਕਰਾਚੀ ਤੋਂ ਬਾਅਦ ਲਹੌਰ ਦੂਜਾ ਸਭ ਤੋਂ ਵੱਡਾ ਸ਼ਹਿਰ ਹੈ । ਲਹੌਰ ਪਾਕਿਸਤਾਨ ਦਾ ਸਿਆਸੀ, ਰਹਤਲੀ ਤੇ ਪੜ੍ਹਾਈ ਦਾ ਗੜ੍ਹ ਹੈ ਅਤੇ ਇਸ ਲਈ ਇਹਨੂੰ ਪਾਕਿਸਤਾਨ ਦਾ ਦਿਲ ਵੀ ਕਿਹਾ ਜਾਂਦਾ ਹੈ । ਲਹੌਰ ਦਰਿਆ-ਏ-ਰਾਵੀ ਦੇ ਕੰਢੇ ਤੇ ਵਸਦਾ ਹੈ ਤੇ ਇਸਦੀ ਲੋਕ ਗਿਣਤੀ ਇੱਕ ਕਰੋੜ ਦੇ ਨੇੜੇ ਹੈ ।]
op string: [shahmukhi] [لہور پاکستانی پنجاب دا دارالحکومت اے۔ لوک گنتی دے نال کراچی توں بعد لہور دوجا سبھ توں وڈا شہر اے۔ لہور پاکستان دا سیاسی، رہتلی تے پڑھائی دا گڑھ اے تے اس لئی ایھنوں پاکستان دا دل وی کیھا جاندا اے۔ لہور دریاۓ راوی دے کنڈھے تے وسدا اے اسدی لوک گنتی اک کروڑ دے نیڑے اے ۔]
op string: [tranliteration] [lahor pākistān panjāb dā dārul hakūmat ē. lōk giṇtī dē nāḷ karācī tō᷈ bāad lahor dūjā sab tō᷈ vaḍḍā shahr ē. lahor pākistān dā siāsī, rahtalī tē paṛā̀ī dā gā́ṛ ē tē is laī ihnū᷈ pākistān dā dil vī kehā jāndā ē. lahor dariāē rāvī dē kanḍē tē vasdā ē. isdī lōk giṇtī ikk karōṛ dē nēṛē ē.]
op close_container: [indian-languages] []
op open_container: [employees] []
op open_leaf_list: [wc] []
op string: [wc] [෴ - 0xdf4 - 1]
op string: [wc] [ණ - 0xdab - 1]
op string: [wc] [් - 0xdca - 0]
op string: [wc] [ණ - 0xdab - 1]
op string: [wc] [្ - 0x17d2 - 0]
op string: [wc] [෴ - 0xdf4 - 1]
op string: [wc] [1 - 0x31 - 1]
op string: [wc] [͏ - 0x34f - 0]
op string: [wc] [2 - 0x32 - 1]
op string: [wc] [⃝ - 0x20dd - 0]
op close_leaf_list: [wc] []
op string: [fancy] [1͏2⃝]
op string: [v1] [γιγνώσκειν]
op string: [v2] [ὦ ἄνδρες ᾿Αθηναῖοι]
op string: [v1] [ახლავე გაიაროთ რეგისტრაცია]
op string: [v2] [Unicode-ის მეათე საერთაშორისო]
op content: [width] [55]
op string: [sinhala] [෴ණ්ණ෴]
op content: [width] [4]
op string: [sinhala] [෴]
op content: [width] [1]
op string: [sinhala] [෴ණ්ණ෴෴ණ්ණ෴]
op content: [width] [8]
op string: [not-sinhala] [123456]
op string: [tag] [ර්‍ඝ]
op content: [width] [2]
op open_list: [employee] []
op open_instance: [employee] []
op string: [first-name] [Jim]
op string: [nic-name] ["რეგტ"]
op string: [last-name] [გთხოვთ ახ]
op content: [department] [431]
op content: [percent-time] [90]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Terry]
op string: [nic-name] ["<one"]
op string: [last-name] [Οὐχὶ ταὐτὰ παρίσταταί μοι Jones]
op content: [department] [660]
op content: [percent-time] [90]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Leslie]
op string: [nic-name] ["Les"]
op string: [last-name] [Patterson]
op content: [department] [341]
op content: [percent-time] [60]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Ashley]
op string: [nic-name] ["Ash"]
op string: [last-name] [Meter & Smith]
op content: [department] [1440]
op content: [percent-time] [40]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [0123456789]
op string: [nic-name] ["0123456789"]
op string: [last-name] [012345678901234567890]
op content: [department] [1440]
op content: [percent-time] [40]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [ახლა]
op string: [nic-name] ["გაიარო"]
op string: [last-name] [საერთაშორისო]
op content: [department] [123]
op content: [percent-time] [90]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [෴ණ්ණ෴෴ණ්ණ෴]
op string: [nic-name] ["Mick"]
op string: [last-name] [෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ෴෴෴]
op content: [department] [110]
op content: [percent-time] [20]
op close_instance: [employee] []
op close_list: [employee] []
op close_container: [employees] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [indian-languages] [] [0x200010]
op string: [gurmukhi] [ਲਹੌਰ ਪਾਕਿਸਤਾਨੀ ਪੰਜਾਬ ਦੀ ਰਾਜਧਾਨੀ ਹੈ । ਲੋਕ ਗਿਣਤੀ ਦੇ ਨਾਲ ਕਰਾਚੀ ਤੋਂ ਬਾਅਦ ਲਹੌਰ ਦੂਜਾ ਸਭ ਤੋਂ ਵੱਡਾ ਸ਼ਹਿਰ ਹੈ । ਲਹੌਰ ਪਾਕਿਸਤਾਨ ਦਾ ਸਿਆਸੀ, ਰਹਤਲੀ ਤੇ ਪੜ੍ਹਾਈ ਦਾ ਗੜ੍ਹ ਹੈ ਅਤੇ ਇਸ ਲਈ ਇਹਨੂੰ ਪਾਕਿਸਤਾਨ ਦਾ ਦਿਲ ਵੀ ਕਿਹਾ ਜਾਂਦਾ ਹੈ । ਲਹੌਰ ਦਰਿਆ-ਏ-ਰਾਵੀ ਦੇ ਕੰਢੇ ਤੇ ਵਸਦਾ ਹੈ ਤੇ ਇਸਦੀ ਲੋਕ ਗਿਣਤੀ ਇੱਕ ਕਰੋੜ ਦੇ ਨੇੜੇ ਹੈ ।] [0]
op string: [shahmukhi] [لہور پاکستانی پنجاب دا دارالحکومت اے۔ لوک گنتی دے نال کراچی توں بعد لہور دوجا سبھ توں وڈا شہر اے۔ لہور پاکستان دا سیاسی، رہتلی تے پڑھائی دا گڑھ اے تے اس لئی ایھنوں پاکستان دا دل وی کیھا جاندا اے۔ لہور دریاۓ راوی دے کنڈھے تے وسدا اے اسدی لوک گنتی اک کروڑ دے نیڑے اے ۔] [0]
op string: [tranliteration] [lahor pākistān panjāb dā dārul hakūmat ē. lōk giṇtī dē nāḷ karācī tō᷈ bāad lahor dūjā sab tō᷈ vaḍḍā shahr ē. lahor pākistān dā siāsī, rahtalī tē paṛā̀ī dā gā́ṛ ē tē is laī ihnū᷈ pākistān dā dil vī kehā jāndā ē. lahor dariāē rāvī dē kanḍē tē vasdā ē. isdī lōk giṇtī ikk karōṛ dē nēṛē ē.] [0]
op close_container: [indian-languages] [] [0]
op open_container: [employees] [] [0x200010]
op open_leaf_list: [wc] [] [0]
op string: [wc] [෴ - 0xdf4 - 1] [0x2010]
op string: [wc] [ණ - 0xdab - 1] [0x2010]
op string: [wc] [් - 0xdca - 0] [0x2010]
op string: [wc] [ණ - 0xdab - 1] [0x2010]
op string: [wc] [្ - 0x17d2 - 0] [0x2010]
op string: [wc] [෴ - 0xdf4 - 1] [0x2010]
op string: [wc] [1 - 0x31 - 1] [0x2010]
op string: [wc] [͏ - 0x34f - 0] [0x2010]
op string: [wc] [2 - 0x32 - 1] [0x2010]
op string: [wc] [⃝ - 0x20dd - 0] [0x2010]
op close_leaf_list: [wc] [] [0]
op string: [fancy] [1͏2⃝] [0]
op string: [v1] [γιγνώσκειν] [0]
op string: [v2] [ὦ ἄνδρες ᾿Αθηναῖοι] [0]
op string: [v1] [ახლავე გაიაროთ რეგისტრაცია] [0]
op string: [v2] [Unicode-ის მეათე საერთაშორისო] [0]
op content: [width] [55] [0]
op string: [sinhala] [෴ණ්ණ෴] [0]
op content: [width] [4] [0]
op string: [sinhala] [෴] [0]
op content: [width] [1] [0]
op string: [sinhala] [෴ණ්ණ෴෴ණ්ණ෴] [0]
op content: [width] [8] [0]
op string: [not-sinhala] [123456] [0]
op string: [tag] [ර්‍ඝ] [0]
op content: [width] [2] [0]
op open_list: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Jim] [0]
op string: [nic-name] ["რეგტ"] [0]
op string: [last-name] [გთხოვთ ახ] [0]
op content: [department] [431] [0]
op content: [percent-time] [90] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Terry] [0]
op string: [nic-name] ["<one"] [0]
op string: [last-name] [Οὐχὶ ταὐτὰ παρίσταταί μοι Jones] [0]
op content: [department] [660] [0]
op content: [percent-time] [90] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Leslie] [0]
op string: [nic-name] ["Les"] [0]
op string: [last-name] [Patterson] [0]
op content: [department] [341] [0]
op content: [percent-time] [60] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Ashley] [0]
op string: [nic-name] ["Ash"] [0]
op string: [last-name] [Meter & Smith] [0]
op content: [department] [1440] [0]
op content: [percent-time] [40] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [0123456789] [0]
op string: [nic-name] ["0123456789"] [0]
op string: [last-name] [012345678901234567890] [0]
op content: [department] [1440] [0]
op content: [percent-time] [40] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [ახლა] [0]
op string: [nic-name] ["გაიარო"] [0]
op string: [last-name] [საერთაშორისო] [0]
op content: [department] [123] [0]
op content: [percent-time] [90] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [෴ණ්ණ෴෴ණ්ණ෴] [0]
op string: [nic-name] ["Mick"] [0]
op string: [last-name] [෴ණ්ණ෴෴ණ්ණ෴෴ණ්ණ෴෴෴] [0]
op content: [department] [110] [0]
op content: [percent-time] [20] [0]
op close_instance: [employee] [] [0]
op close_list: [employee] [] [0]
op close_container: [employees] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,22 +1,22 @@
op create: [] []
op open_container: [employees] []
op open_list: [employee] []
op open_instance: [employee] []
op string: [first-name] [Terry]
op string: [last-name] [Jones]
op content: [department] [660]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Leslie]
op string: [last-name] [Patterson]
op content: [department] [341]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Ashley]
op string: [last-name] [Smith]
op content: [department] [1440]
op close_instance: [employee] []
op close_list: [employee] []
op close_container: [employees] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [employees] [] [0x410]
op open_list: [employee] [] [0]
op open_instance: [employee] [] [0x410]
op string: [first-name] [Terry] [0]
op string: [last-name] [Jones] [0]
op content: [department] [660] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x410]
op string: [first-name] [Leslie] [0]
op string: [last-name] [Patterson] [0]
op content: [department] [341] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x410]
op string: [first-name] [Ashley] [0]
op string: [last-name] [Smith] [0]
op content: [department] [1440] [0]
op close_instance: [employee] [] [0]
op close_list: [employee] [] [0]
op close_container: [employees] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,76 +1,76 @@
op create: [] []
op open_container: [employees] []
op open_list: [test] []
op open_instance: [test] []
op string: [filename] [(null)]
op close_instance: [test] []
op close_list: [test] []
op string: [v1] [γιγνώσκειν]
op string: [v2] [ὦ ἄνδρες ᾿Αθηναῖοι]
op content: [columns] [28]
op content: [columns] [2]
op string: [v1] [ახლავე გაიაროთ რეგისტრაცია]
op string: [v2] [Unicode-ის მეათე საერთაშორისო]
op content: [columns] [55]
op content: [columns] [0]
op open_list: [employee] []
op open_instance: [employee] []
op string: [first-name] [Jim]
op string: [nic-name] ["რეგტ"]
op string: [last-name] [გთხოვთ ახ]
op content: [department] [431]
op content: [percent-time] [90]
op content: [columns] [23]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Terry]
op string: [nic-name] ["<one"]
op string: [last-name] [Οὐχὶ ταὐτὰ παρίσταταί μοι Jones]
op content: [department] [660]
op content: [percent-time] [90]
op content: [columns] [47]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Leslie]
op string: [nic-name] ["Les"]
op string: [last-name] [Patterson]
op content: [department] [341]
op content: [percent-time] [60]
op content: [columns] [25]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [Ashley]
op string: [nic-name] ["Ash"]
op string: [last-name] [Meter & Smith]
op content: [department] [1440]
op content: [percent-time] [40]
op content: [columns] [30]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [0123456789]
op string: [nic-name] ["0123456789"]
op string: [last-name] [012345678901234567890]
op content: [department] [1440]
op content: [percent-time] [40]
op content: [columns] [49]
op close_instance: [employee] []
op open_instance: [employee] []
op string: [first-name] [ახლა]
op string: [nic-name] ["გაიარო"]
op string: [last-name] [საერთაშორისო]
op content: [department] [123]
op content: [percent-time] [90]
op content: [columns] [29]
op attr: [full-time] [honest & for true]
op string: [benefits] [full]
op close_instance: [employee] []
op close_list: [employee] []
op close_container: [employees] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [employees] [] [0x200010]
op open_list: [test] [] [0]
op open_instance: [test] [] [0x200010]
op string: [filename] [(null)] [0x88]
op close_instance: [test] [] [0]
op close_list: [test] [] [0]
op string: [v1] [γιγνώσκειν] [0]
op string: [v2] [ὦ ἄνδρες ᾿Αθηναῖοι] [0]
op content: [columns] [28] [0]
op content: [columns] [2] [0]
op string: [v1] [ახლავე გაიაროთ რეგისტრაცია] [0]
op string: [v2] [Unicode-ის მეათე საერთაშორისო] [0]
op content: [columns] [55] [0]
op content: [columns] [0] [0]
op open_list: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Jim] [0]
op string: [nic-name] ["რეგტ"] [0]
op string: [last-name] [გთხოვთ ახ] [0]
op content: [department] [431] [0]
op content: [percent-time] [90] [0]
op content: [columns] [23] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Terry] [0]
op string: [nic-name] ["<one"] [0]
op string: [last-name] [Οὐχὶ ταὐτὰ παρίσταταί μοι Jones] [0]
op content: [department] [660] [0]
op content: [percent-time] [90] [0]
op content: [columns] [47] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Leslie] [0]
op string: [nic-name] ["Les"] [0]
op string: [last-name] [Patterson] [0]
op content: [department] [341] [0]
op content: [percent-time] [60] [0]
op content: [columns] [25] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [Ashley] [0]
op string: [nic-name] ["Ash"] [0]
op string: [last-name] [Meter & Smith] [0]
op content: [department] [1440] [0]
op content: [percent-time] [40] [0]
op content: [columns] [30] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [0123456789] [0]
op string: [nic-name] ["0123456789"] [0]
op string: [last-name] [012345678901234567890] [0]
op content: [department] [1440] [0]
op content: [percent-time] [40] [0]
op content: [columns] [49] [0]
op close_instance: [employee] [] [0]
op open_instance: [employee] [] [0x200010]
op string: [first-name] [ახლა] [0]
op string: [nic-name] ["გაიარო"] [0]
op string: [last-name] [საერთაშორისო] [0]
op content: [department] [123] [0]
op content: [percent-time] [90] [0]
op content: [columns] [29] [0]
op attr: [full-time] [honest & for true] [0]
op string: [benefits] [full] [0x8]
op close_instance: [employee] [] [0]
op close_list: [employee] [] [0]
op close_container: [employees] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,186 +1,186 @@
op create: [] []
op open_container: [top] []
op open_container: [data] []
op open_container: [contents] []
op open_list: [item] []
op open_instance: [item] []
op string: [name] [gum]
op content: [count] [1412]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [rope]
op content: [count] [85]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [ladder]
op content: [count] [0]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [bolt]
op content: [count] [4123]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [water]
op content: [count] [17]
op close_instance: [item] []
op close_list: [item] []
op close_container: [contents] []
op close_container: [data] []
op open_container: [data2] []
op open_container: [contents] []
op open_list: [item] []
op open_instance: [item] []
op string: [name] [gum]
op content: [count] [1412]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [rope]
op content: [count] [85]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [ladder]
op content: [count] [0]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [bolt]
op content: [count] [4123]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [water]
op content: [count] [17]
op close_instance: [item] []
op close_list: [item] []
op close_container: [contents] []
op close_container: [data2] []
op open_container: [data3] []
op open_container: [contents] []
op open_list: [item] []
op open_instance: [item] []
op string: [name] [gum]
op content: [count] [1412]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [rope]
op content: [count] [85]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [ladder]
op content: [count] [0]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [bolt]
op content: [count] [4123]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [water]
op content: [count] [17]
op string: [test] [one]
op close_instance: [item] []
op close_list: [item] []
op close_container: [contents] []
op close_container: [data3] []
op open_container: [data4] []
op open_container: [contents] []
op open_list: [item] []
op open_instance: [item] []
op string: [name] [gum]
op content: [count] [1412]
op open_list: [sub] []
op open_instance: [sub] []
op content: [name] [0]
op content: [next] [1]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [1]
op content: [next] [2]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [2]
op content: [next] [3]
op close_instance: [sub] []
op close_list: [sub] []
op content: [last] [3]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [rope]
op content: [count] [85]
op open_list: [sub] []
op open_instance: [sub] []
op content: [name] [0]
op content: [next] [1]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [1]
op content: [next] [2]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [2]
op content: [next] [3]
op close_instance: [sub] []
op close_list: [sub] []
op content: [last] [3]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [ladder]
op content: [count] [0]
op open_list: [sub] []
op open_instance: [sub] []
op content: [name] [0]
op content: [next] [1]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [1]
op content: [next] [2]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [2]
op content: [next] [3]
op close_instance: [sub] []
op close_list: [sub] []
op content: [last] [3]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [bolt]
op content: [count] [4123]
op open_list: [sub] []
op open_instance: [sub] []
op content: [name] [0]
op content: [next] [1]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [1]
op content: [next] [2]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [2]
op content: [next] [3]
op close_instance: [sub] []
op close_list: [sub] []
op content: [last] [3]
op close_instance: [item] []
op open_instance: [item] []
op string: [name] [water]
op content: [count] [17]
op open_list: [sub] []
op open_instance: [sub] []
op content: [name] [0]
op content: [next] [1]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [1]
op content: [next] [2]
op close_instance: [sub] []
op open_instance: [sub] []
op content: [name] [2]
op content: [next] [3]
op close_instance: [sub] []
op close_list: [sub] []
op content: [last] [3]
op string: [test] [one]
op close_instance: [item] []
op close_list: [item] []
op close_container: [contents] []
op close_container: [data4] []
op close_container: [top] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [top] [] [0x810]
op open_container: [data] [] [0x810]
op open_container: [contents] [] [0x810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [gum] [0x80]
op content: [count] [1412] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [rope] [0x80]
op content: [count] [85] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [ladder] [0x80]
op content: [count] [0] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [bolt] [0x80]
op content: [count] [4123] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [water] [0x80]
op content: [count] [17] [0x20]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [contents] [] [0]
op close_container: [data] [] [0]
op open_container: [data2] [] [0x810]
op open_container: [contents] [] [0x810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [gum] [0x80]
op content: [count] [1412] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [rope] [0x80]
op content: [count] [85] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [ladder] [0x80]
op content: [count] [0] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [bolt] [0x80]
op content: [count] [4123] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [water] [0x80]
op content: [count] [17] [0x20]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [contents] [] [0]
op close_container: [data2] [] [0]
op open_container: [data3] [] [0x810]
op open_container: [contents] [] [0x810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [gum] [0x80]
op content: [count] [1412] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [rope] [0x80]
op content: [count] [85] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [ladder] [0x80]
op content: [count] [0] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [bolt] [0x80]
op content: [count] [4123] [0x20]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [water] [0x80]
op content: [count] [17] [0x20]
op string: [test] [one] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [contents] [] [0]
op close_container: [data3] [] [0]
op open_container: [data4] [] [0x810]
op open_container: [contents] [] [0x810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [gum] [0x80]
op content: [count] [1412] [0x20]
op open_list: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [0] [0]
op content: [next] [1] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [1] [0]
op content: [next] [2] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [2] [0]
op content: [next] [3] [0]
op close_instance: [sub] [] [0]
op close_list: [sub] [] [0]
op content: [last] [3] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [rope] [0x80]
op content: [count] [85] [0x20]
op open_list: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [0] [0]
op content: [next] [1] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [1] [0]
op content: [next] [2] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [2] [0]
op content: [next] [3] [0]
op close_instance: [sub] [] [0]
op close_list: [sub] [] [0]
op content: [last] [3] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [ladder] [0x80]
op content: [count] [0] [0x20]
op open_list: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [0] [0]
op content: [next] [1] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [1] [0]
op content: [next] [2] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [2] [0]
op content: [next] [3] [0]
op close_instance: [sub] [] [0]
op close_list: [sub] [] [0]
op content: [last] [3] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [bolt] [0x80]
op content: [count] [4123] [0x20]
op open_list: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [0] [0]
op content: [next] [1] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [1] [0]
op content: [next] [2] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [2] [0]
op content: [next] [3] [0]
op close_instance: [sub] [] [0]
op close_list: [sub] [] [0]
op content: [last] [3] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x810]
op string: [name] [water] [0x80]
op content: [count] [17] [0x20]
op open_list: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [0] [0]
op content: [next] [1] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [1] [0]
op content: [next] [2] [0]
op close_instance: [sub] [] [0]
op open_instance: [sub] [] [0x810]
op content: [name] [2] [0]
op content: [next] [3] [0]
op close_instance: [sub] [] [0]
op close_list: [sub] [] [0]
op content: [last] [3] [0]
op string: [test] [one] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [contents] [] [0]
op close_container: [data4] [] [0]
op close_container: [top] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,40 +1,40 @@
op create: [] []
op open_container: [top] []
op open_container: [data] []
op open_container: [contents] []
op open_leaf_list: [name] []
op string: [name] [gum]
op string: [name] [rope]
op string: [name] [ladder]
op string: [name] [bolt]
op string: [name] [water]
op close_leaf_list: [name] []
op close_container: [contents] []
op open_container: [contents] []
op open_leaf_list: [item] []
op string: [item] [gum]
op string: [item] [rope]
op string: [item] [ladder]
op string: [item] [bolt]
op string: [item] [water]
op close_leaf_list: [item] []
op close_container: [contents] []
op open_container: [contents] []
op open_list: [item] []
op string: [item] [gum]
op string: [item] [rope]
op string: [item] [ladder]
op string: [item] [bolt]
op string: [item] [water]
op close_list: [item] []
op string: [total] [six]
op string: [one] [one]
op open_leaf_list: [two] []
op string: [two] [two]
op close_leaf_list: [two] []
op string: [three] [three]
op close_container: [contents] []
op close_container: [data] []
op close_container: [top] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [top] [] [0x810]
op open_container: [data] [] [0x810]
op open_container: [contents] [] [0x810]
op open_leaf_list: [name] [] [0]
op string: [name] [gum] [0x2000]
op string: [name] [rope] [0x2000]
op string: [name] [ladder] [0x2000]
op string: [name] [bolt] [0x2000]
op string: [name] [water] [0x2000]
op close_leaf_list: [name] [] [0]
op close_container: [contents] [] [0]
op open_container: [contents] [] [0x810]
op open_leaf_list: [item] [] [0]
op string: [item] [gum] [0x2000]
op string: [item] [rope] [0x2000]
op string: [item] [ladder] [0x2000]
op string: [item] [bolt] [0x2000]
op string: [item] [water] [0x2000]
op close_leaf_list: [item] [] [0]
op close_container: [contents] [] [0]
op open_container: [contents] [] [0x810]
op open_list: [item] [] [0]
op string: [item] [gum] [0x2000]
op string: [item] [rope] [0x2000]
op string: [item] [ladder] [0x2000]
op string: [item] [bolt] [0x2000]
op string: [item] [water] [0x2000]
op close_list: [item] [] [0]
op string: [total] [six] [0]
op string: [one] [one] [0]
op open_leaf_list: [two] [] [0]
op string: [two] [two] [0x2000]
op close_leaf_list: [two] [] [0]
op string: [three] [three] [0]
op close_container: [contents] [] [0]
op close_container: [data] [] [0]
op close_container: [top] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,126 +1,126 @@
op create: [] []
op version: [] [3.1.4]
op open_container: [top] []
op attr: [test] [value]
op open_container: [data] []
op open_list: [item] []
op attr: [test2] [value2]
op close_list: [item] []
op string: [data] [bold]
op string: [data] [bold-ul]
op string: [data] [triple]
op string: [data] [inv-ul]
op string: [data] [underline]
op string: [data] [plain]
op open_list: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [GRO-000-415]
op string: [name] [gum]
op content: [sold] [1412]
op content: [in-stock] [54]
op content: [on-order] [10]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [HRD-000-212]
op string: [name] [rope]
op content: [sold] [85]
op content: [in-stock] [4]
op content: [on-order] [2]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [HRD-000-517]
op string: [name] [ladder]
op content: [sold] [0]
op content: [in-stock] [2]
op content: [on-order] [1]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [HRD-000-632]
op string: [name] [bolt]
op content: [sold] [4123]
op content: [in-stock] [144]
op content: [on-order] [42]
op close_instance: [item] []
op open_instance: [item] []
op attr: [test3] [value3]
op string: [sku] [GRO-000-2331]
op string: [name] [water]
op content: [sold] [17]
op content: [in-stock] [14]
op content: [on-order] [2]
op close_instance: [item] []
op close_list: [item] []
op close_container: [data] []
op open_container: [data] []
op open_list: [item] []
op open_instance: [item] []
op string: [sku] [GRO-000-415]
op string: [name] [gum]
op content: [sold] [1412.0]
op content: [in-stock] [54]
op content: [on-order] [10]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [HRD-000-212]
op string: [name] [rope]
op content: [sold] [85.0]
op content: [in-stock] [4]
op content: [on-order] [2]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [HRD-000-517]
op string: [name] [ladder]
op content: [sold] [0]
op content: [in-stock] [2]
op content: [on-order] [1]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [HRD-000-632]
op string: [name] [bolt]
op content: [sold] [4123.0]
op content: [in-stock] [144]
op content: [on-order] [42]
op close_instance: [item] []
op open_instance: [item] []
op string: [sku] [GRO-000-2331]
op string: [name] [water]
op content: [sold] [17.0]
op content: [in-stock] [14]
op content: [on-order] [2]
op close_instance: [item] []
op close_list: [item] []
op close_container: [data] []
op open_container: [data] []
op open_list: [item] []
op open_instance: [item] []
op string: [sku] [GRO-000-533]
op string: [name] [fish]
op content: [sold] [1321.0]
op content: [in-stock] [45]
op content: [on-order] [1]
op close_instance: [item] []
op close_list: [item] []
op close_container: [data] []
op open_container: [data] []
op open_list: [item] []
op attr: [test4] [value4]
op string: [item] [gum]
op attr: [test4] [value4]
op string: [item] [rope]
op attr: [test4] [value4]
op string: [item] [ladder]
op attr: [test4] [value4]
op string: [item] [bolt]
op attr: [test4] [value4]
op string: [item] [water]
op close_list: [item] []
op close_container: [data] []
op content: [cost] [425]
op content: [cost] [455]
op close_container: [top] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op version: [] [3.1.4] [0]
op open_container: [top] [] [0x4000810]
op attr: [test] [value] [0]
op open_container: [data] [] [0x4000810]
op open_list: [item] [] [0]
op attr: [test2] [value2] [0]
op close_list: [item] [] [0]
op string: [data] [bold] [0]
op string: [data] [bold-ul] [0]
op string: [data] [triple] [0]
op string: [data] [inv-ul] [0]
op string: [data] [underline] [0]
op string: [data] [plain] [0]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op attr: [test3] [value3] [0]
op string: [sku] [GRO-000-415] [0x98]
op string: [name] [gum] [0x80]
op content: [sold] [1412] [0x20]
op content: [in-stock] [54] [0]
op content: [on-order] [10] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op attr: [test3] [value3] [0]
op string: [sku] [HRD-000-212] [0x98]
op string: [name] [rope] [0x80]
op content: [sold] [85] [0x20]
op content: [in-stock] [4] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op attr: [test3] [value3] [0]
op string: [sku] [HRD-000-517] [0x98]
op string: [name] [ladder] [0x80]
op content: [sold] [0] [0x20]
op content: [in-stock] [2] [0]
op content: [on-order] [1] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op attr: [test3] [value3] [0]
op string: [sku] [HRD-000-632] [0x98]
op string: [name] [bolt] [0x80]
op content: [sold] [4123] [0x20]
op content: [in-stock] [144] [0]
op content: [on-order] [42] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op attr: [test3] [value3] [0]
op string: [sku] [GRO-000-2331] [0x98]
op string: [name] [water] [0x80]
op content: [sold] [17] [0x20]
op content: [in-stock] [14] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [data] [] [0]
op open_container: [data] [] [0x4000810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op string: [sku] [GRO-000-415] [0x98]
op string: [name] [gum] [0x80]
op content: [sold] [1412.0] [0x20]
op content: [in-stock] [54] [0]
op content: [on-order] [10] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op string: [sku] [HRD-000-212] [0x98]
op string: [name] [rope] [0x80]
op content: [sold] [85.0] [0x20]
op content: [in-stock] [4] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op string: [sku] [HRD-000-517] [0x98]
op string: [name] [ladder] [0x80]
op content: [sold] [0] [0x20]
op content: [in-stock] [2] [0]
op content: [on-order] [1] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op string: [sku] [HRD-000-632] [0x98]
op string: [name] [bolt] [0x80]
op content: [sold] [4123.0] [0x20]
op content: [in-stock] [144] [0]
op content: [on-order] [42] [0]
op close_instance: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op string: [sku] [GRO-000-2331] [0x98]
op string: [name] [water] [0x80]
op content: [sold] [17.0] [0x20]
op content: [in-stock] [14] [0]
op content: [on-order] [2] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [data] [] [0]
op open_container: [data] [] [0x4000810]
op open_list: [item] [] [0]
op open_instance: [item] [] [0x4000810]
op string: [sku] [GRO-000-533] [0x98]
op string: [name] [fish] [0x80]
op content: [sold] [1321.0] [0x20]
op content: [in-stock] [45] [0]
op content: [on-order] [1] [0]
op close_instance: [item] [] [0]
op close_list: [item] [] [0]
op close_container: [data] [] [0]
op open_container: [data] [] [0x4000810]
op open_list: [item] [] [0]
op attr: [test4] [value4] [0]
op string: [item] [gum] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [rope] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [ladder] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [bolt] [0x2000]
op attr: [test4] [value4] [0]
op string: [item] [water] [0x2000]
op close_list: [item] [] [0]
op close_container: [data] [] [0]
op content: [cost] [425] [0]
op content: [cost] [455] [0]
op close_container: [top] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,26 +1,22 @@
op create: [] []
op version: [] [3.1.4]
op open_container: [top] []
op create: [] []
op create: [] [] [0]
op version: [] [3.1.4] [0]
op open_container: [top] [] [0x10]
{{<14>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-status [animal-status@42 animal="snake" state="loose"] The snake is loose}}
{{test-program: }}
{{The snake is loose}}
op create: [] []
{{<22>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-consumed [animal-consumed@42 animal="snake" pet="hamster"] My snake ate your hamster}}
{{test-program: }}
{{My snake ate your hamster}}
op create: [] []
{{<29>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-talk [animal-talk@42 count="1" animal="owl" quote="\"e=m\\c[2\]\""] 1 owl said "e=m\c[2]"}}
{{test-program: }}
{{1 owl said "e=m\c[2]"}}
op create: [] []
{{<165>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 ID47 [ID47@32473 iut="3" event-source="application" event-id="1011"] An application 1011 log entry}}
{{test-program: }}
{{An application 1011 log entry}}
op close_container: [top] []
op finish: [] []
op flush: [] []
op close_container: [top] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

View File

@ -1,16 +1,16 @@
{{<14>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-status [animal-status@42 animal="" state=""] The snake is loose}}
{{<14>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-status [animal-status@42 animal="snake" state="loose"] The snake is loose}}
{{test-program: }}
{{The snake is loose}}
{{<22>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-consumed [animal-consumed@42 animal="" pet=""] My snake ate your hamster}}
{{<22>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-consumed [animal-consumed@42 animal="snake" pet="hamster"] My snake ate your hamster}}
{{test-program: }}
{{My snake ate your hamster}}
{{<29>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-talk [animal-talk@42 count="" animal="" quote=""] 1 owl said "e=m\c[2]"}}
{{<29>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 animal-talk [animal-talk@42 count="1" animal="owl" quote="\"e=m\\c[2\]\""] 1 owl said "e=m\c[2]"}}
{{test-program: }}
{{1 owl said "e=m\c[2]"}}
{{<165>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 ID47 [ID47@32473 iut="" event-source="" event-id=""] An application 1011 log entry}}
{{<165>1 2015-06-23T13:47:09.123-0500 worker-host test-program 222 ID47 [ID47@32473 iut="3" event-source="application" event-id="1011"] An application 1011 log entry}}
{{test-program: }}
{{An application 1011 log entry}}

View File

@ -1,89 +1,91 @@
op create: [] []
op open_container: [top] []
op open_container: [data] []
op open_list: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op open_instance: [thing] []
op string: [name] [thing]
op string: [color] [green]
op content: [time] [2:15]
op string: [hand] [left]
op string: [color] [blue]
op content: [time] [3:45]
op close_instance: [thing] []
op close_list: [thing] []
op close_container: [data] []
op close_container: [top] []
op finish: [] []
op flush: [] []
op create: [] [] [0]
op open_container: [top] [] [0x4040010]
op open_container: [data] [] [0x4040010]
op string: [animal] [fish] [0]
op string: [animal] [fish] [0]
op open_list: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op open_instance: [thing] [] [0x4040010]
op string: [name] [thing] [0x80]
op string: [color] [green] [0]
op content: [time] [2:15] [0]
op string: [hand] [left] [0]
op string: [color] [blue] [0]
op content: [time] [3:45] [0]
op close_instance: [thing] [] [0]
op close_list: [thing] [] [0]
op close_container: [data] [] [0]
op close_container: [top] [] [0]
op finish: [] [] [0]
op flush: [] [] [0]

File diff suppressed because one or more lines are too long

View File

@ -1,160 +1,169 @@
<div class="line">
<div class="text color-fg-red color-bg-green">Merry XMas!!</div>
</div>
<div class="line">
<div class="text">One </div>
<div class="data color-fg-yellow color-bg-blue" data-tag="animal" data-xpath="/top/data/animal">fish</div>
<div class="text">, Two </div>
<div class="data color-fg-green color-bg-yellow" data-tag="animal" data-xpath="/top/data/animal">fish</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="data color-fg-red" data-tag="name" data-xpath="/top/data/thing/name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="data color-fg-green" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="data color-fg-red" data-tag="hand" data-xpath="/top/data/thing[name = 'thing']/hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="data color-fg-blue" data-tag="color" data-xpath="/top/data/thing[name = 'thing']/color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time" data-xpath="/top/data/thing[name = 'thing']/time">03:45</div>
</div>

View File

@ -1,160 +1,169 @@
<div class="line">
<div class="text color-fg-red color-bg-green">Merry XMas!!</div>
</div>
<div class="line">
<div class="text">One </div>
<div class="data color-fg-yellow color-bg-blue" data-tag="animal">fish</div>
<div class="text">, Two </div>
<div class="data color-fg-green color-bg-yellow" data-tag="animal">fish</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">thing</div>
<div class="data color-fg-red" data-tag="name">thing</div>
<div class="text"> is </div>
<div class="data" data-tag="color">green</div>
<div class="data color-fg-green" data-tag="color">green</div>
<div class="text"> til </div>
<div class="data" data-tag="time">02:15</div>
</div>
<div class="line">
<div class="text">My </div>
<div class="data" data-tag="hand">left</div>
<div class="data color-fg-red" data-tag="hand">left</div>
<div class="text"> hand is </div>
<div class="data" data-tag="color">blue</div>
<div class="data color-fg-blue" data-tag="color">blue</div>
<div class="text"> til </div>
<div class="data" data-tag="time">03:45</div>
</div>

View File

@ -1,2 +1,2 @@
{"top": {"data": {"thing": [{"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}]}}
{"top": {"data": {"animal":"fish","animal":"fish", "thing": [{"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}, {"name":"thing","color":"green","time":2:15,"hand":"left","color":"blue","time":3:45}]}}
}

View File

@ -1,6 +1,8 @@
{
"top": {
"data": {
"animal": "fish",
"animal": "fish",
"thing": [
{
"name": "thing",

View File

@ -1,20 +1,22 @@
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
Merry XMas!!
One fish, Two fish
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45
The thing is green til 02:15
My left hand is blue til 03:45

View File

@ -1 +1 @@
<top><data><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing></data></top>
<top><data><animal>fish</animal><animal>fish</animal><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing><thing><name>thing</name><color>green</color><time>2:15</time><hand>left</hand><color>blue</color><time>3:45</time></thing></data></top>

View File

@ -1,5 +1,7 @@
<top>
<data>
<animal>fish</animal>
<animal>fish</animal>
<thing>
<name>thing</name>
<color>green</color>

View File

@ -22,6 +22,7 @@ main (int argc, char **argv)
int i, count = 10;
int mon = 0;
xo_emit_flags_t flags = XOEF_RETAIN;
int opt_color = 1;
argc = xo_parse_args(argc, argv);
if (argc < 0)
@ -36,6 +37,8 @@ main (int argc, char **argv)
xo_set_style(NULL, XO_STYLE_TEXT);
else if (strcmp(argv[argc], "html") == 0)
xo_set_style(NULL, XO_STYLE_HTML);
else if (strcmp(argv[argc], "no-color") == 0)
opt_color = 0;
else if (strcmp(argv[argc], "pretty") == 0)
xo_set_flags(NULL, XOF_PRETTY);
else if (strcmp(argv[argc], "xpath") == 0)
@ -51,11 +54,19 @@ main (int argc, char **argv)
}
xo_set_flags(NULL, XOF_UNITS); /* Always test w/ this */
if (opt_color)
xo_set_flags(NULL, XOF_COLOR); /* Force color output */
xo_set_file(stdout);
xo_open_container("top");
xo_open_container("data");
xo_emit("{C:fg-red,bg-green}Merry XMas!!{C:}\n");
xo_emit("One {C:fg-yellow,bg-blue}{:animal}{C:}, "
"Two {C:fg-green,bg-yellow}{:animal}{C:}\n",
"fish", "fish");
const char *fmt1 = "The {C:fg-red}{k:name}{C:reset} is "
"{C:/fg-%s}{:color}{C:reset} til {:time/%02d:%02d}\n";
const char *fmt2 = "My {C:fg-red}{:hand}{C:reset} hand is "

View File

@ -72,8 +72,7 @@ valgrind:
#TEST_TRACE = set -x ;
TEST_ONE = \
LIBXO_OPTIONS=:W$$fmt \
${CHECKER} ./$$base.test ${TEST_OPTS} \
${CHECKER} ./$$base.test --libxo:W$$fmt ${TEST_OPTS} \
> out/$$base.$$fmt.out 2> out/$$base.$$fmt.err ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.out out/$$base.$$fmt.out ${S2O} ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.err out/$$base.$$fmt.err ${S2O}

View File

@ -51,8 +51,7 @@ all:
XO=../../xo/xo
TEST_ONE = \
LIBXO_OPTIONS=:W$$fmt \
${CHECKER} sh ${srcdir}/$$base.sh ${XO} ${TEST_OPTS} \
${CHECKER} sh ${srcdir}/$$base.sh "${XO} --libxo:W$$fmt" ${TEST_OPTS} \
> out/$$base.$$fmt.out 2> out/$$base.$$fmt.err ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.out out/$$base.$$fmt.out ${S2O} ; \
${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.err out/$$base.$$fmt.err ${S2O}

87
xo/xo.1
View File

@ -33,38 +33,38 @@ or
.Em HTML
using the same commands that emit text output.
.Pp
.Bl -tag -width "12345678901234567"
.It Fl "-close <path>"
.Bl -tag -width indent
.It Ic --close Ar path
Close tags for the given path
.It Fl "-depth <num>"
.It Ic --depth Ar num
Set the depth for pretty printing
.It Fl "-help"
Display this help text
.It Fl "-html OR -H"
.It Ic --help
Display help text
.It Ic -H | Ic --html
Generate HTML output
.It Fl "-json OR -J"
.It Ic -J | Ic --json
Generate JSON output
.It Fl "-leading-xpath <path>"
.It Ic --leading-xpath Ar path
Add a prefix to generated XPaths (HTML)
.It Fl "-open <path>"
.It Ic --open Ar path
Open tags for the given path
.It Fl "-pretty OR -p"
.It Ic -p | Ic --pretty
Make 'pretty' output (add indent, newlines)
.It Fl "-style <style>"
.It Ic --style Ar style
Generate given style (xml, json, text, html)
.It Fl "-text OR -T"
.It Ic -T | Ic --text
Generate text output (the default style)
.It Fl "-version"
.It Ic --version
Display version information
.It Fl "-warn OR -W"
.It Ic -W | Ic --warn
Display warnings in text on stderr
.It Fl "-warn-xml"
.It Ic --warn-xml
Display warnings in xml on stdout
.It Fl "-wrap <path>"
.It Ic --wrap Ar path
Wrap output in a set of containers
.It Fl "-xml OR -X"
.It Ic -X | Ic --xml
Generate XML output
.It Fl "-xpath"
.It Ic --xpath
Add XPath data to HTML output
.El
.Pp
@ -73,9 +73,32 @@ The
utility accepts a format string suitable for
.Xr xo_emit 3
and a set of zero or more arguments used to supply data for that string.
.Pp
In addition,
.Nm
accepts any of the
.Nm libxo
options listed in
.Xr xo_options 7 .
.Sh EXAMPLES
In this example,
.Nm
is used to emit the same data encoded in text and then in XML by
adding the "-p" (pretty) and "-X" (XML output) flags:
.Bd -literal -offset indent
xo "The {k:name} weighs {:weight/%d} pounds.\\n" fish 6
% xo 'The {:product} is {:status}\\n' stereo "in route"
The stereo is in route
% xo -p -X 'The {:product} is {:status}\\n' stereo "in route"
<product>stereo</product>
<status>in route</status>
.Ed
.Pp
In this example, the output from a
.Nm
command is shown in several styles:
.Bd -literal -offset indent
xo "The {k:name} weighs {:weight/%d} pounds.\\n" fish 6
.Pp
TEXT:
The fish weighs 6 pounds.
XML:
@ -101,8 +124,8 @@ specific hierarchy.
The path is a set of hierarchical names separated
by the '/' character.
.Bd -literal -offset indent
xo --wrap top/a/b/c '{:tag}' value
xo --wrap top/a/b/c '{:tag}' value
.Pp
XML:
<top>
<a>
@ -143,10 +166,11 @@ The
may be used to
prepend data to the XPath values used for HTML output style.
.Bd -literal -offset indent
#!/bin/sh
xo --open top/data
xo --depth 2 '{tag}' value
xo --close top/data
#!/bin/sh
xo --open top/data
xo --depth 2 '{tag}' value
xo --close top/data
.Pp
XML:
<top>
<data>
@ -160,14 +184,7 @@ prepend data to the XPath values used for HTML output style.
}
}
.Ed
.Sh EXAMPLE
.Bd -literal
% xo 'The {:product} is {:status}\n' stereo "in route"
The stereo is in route
% xo -p -X 'The {:product} is {:status}\n' stereo "in route"
<product>stereo</product>
<status>in route</status>
.Ed
.Sh SEE ALSO
.Xr libxo 3 ,
.Xr xo_emit 3
.Xr xo_emit 3 ,
.Xr xo_options 7

View File

@ -16,7 +16,6 @@
.Xr xo_emit 3
.Sh SYNOPSIS
.Nm xohtml
.Op Fl c
.Op Fl "b <base>"
.Op Fl "c" <command>"
.Op Fl "f" <output>
@ -53,24 +52,21 @@ will add the "--libxo=html" option needed to generate HTML output
from
.Nm libxo "-enabled"
applications. See
.Xr libxo 3
.Xr xo_options 7
for details.
.Pp
The following options are available:
.Bl -tag -width indent
.It Fl "b <base>"
.It Fl "-base <base>"
.It Ic -b Ar base | Ic --base Ar base
Supplies a source path for the CSS and Javascript files referenced in
the output of
.Nm xohtml .
.It Fl "c <command>"
.It Fl "-command <command>"
.It Ic -c Ar command | Ic --command Ar command
Use the given command instead of one on the command line.
This command should be quoted if it consists of multiple tokens, and
should contain the "--libxo=html" option or equivalent, since the
command is used directly.
.It Fl "f <file>"
.It Fl "-file <file>"
.It Ic -f Ar file | Ic --file Ar file
Output is saved to the given file, rather than to the standard output
descriptor.
.El
@ -96,4 +92,5 @@ the output to /tmp/src.html:
.Pp
.Sh SEE ALSO
.Xr libxo 3 ,
.Xr xo_emit 3
.Xr xo_emit 3 ,
.Xr xo_options 7

View File

@ -53,18 +53,18 @@ output stream, allowing
.Nm
to operated as a filter.
.Pp
.Bl -tag -width "12345678901234567"
.It Fl "-simplify OR -s <text>"
Generate the simplified version of a single text string.
.It Fl "-po OR -f <pofile>"
.Bl -tag -width indent
.It Ic -f Ar pofile | Ic --po Ar pofile
Use the given po file for input.
.It Fl "-help"
.It Ic --help
Display this help text
.It Fl "-output OR -o <file>"
.It Ic -o Ar file | Ic --output Ar file
Write output content to the given file
.It Fl "-warn OR -W"
.It Ic -s Ar text | Ic --simplify Ar text
Generate the simplified version of a single text string.
.It Ic -W | Ic --warn
Generate warnings while parsing the format strings
.It Fl "-version"
.It Ic --version
Display version information
.El
.Pp

View File

@ -114,7 +114,6 @@ static struct option long_opts[] = {
int
main (int argc UNUSED, char **argv)
{
char *fmt = NULL;
char *opt_options = NULL;
char *opt_input = NULL;
char *opt_output = NULL;
@ -189,10 +188,8 @@ main (int argc UNUSED, char **argv)
xo_errx(1, "invalid options: %s", opt_options);
}
fmt = *argv++;
if (opt_simplify) {
fmt = xo_simplify_format(NULL, opt_simplify, opt_numbers, NULL);
char *fmt = xo_simplify_format(NULL, opt_simplify, opt_numbers, NULL);
if (fmt) {
xo_emit("{:format}\n", fmt);
free(fmt);