Print a namespaced XML inventory with its mixed text intact
Admin ·
A workshop inventory uses a namespace and puts emphasis inside one note. Keep the original XML for data exchange and print a source listing readers can search and annotate.
Locate the namespace and the leading-zero code
Select Load example. Find the xmlns:inv attribute on inv:inventory and the code value 00427 on inv:item. The prefix remains visible on each qualified element.
Inspect inv:note. The words Keep, dry and overnight remain in order around the inv:strong element.
<inv:note>Keep <inv:strong>dry</inv:strong> overnight.</inv:note>W3C XML 1.0 — Logical structures and whitespaceW3C Namespaces in XML 1.0
Compare the original spacing with the indented listing
Choose Original spacing and prepare the preview again. The source line breaks return. The indentation option adds visual space between structural nodes while preserving the note's mixed content.
If the source uses xml:space to protect a section, compare that section in both versions. Keep Original spacing when the input's whitespace is itself part of your review.
Save a PDF and search for the inventory code
Select Print or save PDF and choose Save as PDF. For a document with long attributes, try landscape or a smaller text size. The PDF wraps long lines at the page width.
Open the saved PDF and search for 00427. Keep the XML alongside the PDF when downstream tools still need the original markup.
Common questions
Will XML processing instructions load an external stylesheet?
Processing instructions appear as selectable text in the listing. Their addresses stay inert.
Why does the preview reject a missing namespace binding?
Well-formed namespace-aware XML requires a declaration that binds each used prefix in scope. Add the appropriate xmlns declaration before preparing the listing.