Word Document Properties


Chapter 11: VBA Programming with XML



Download 8,82 Mb.
Pdf ko'rish
bet206/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   199   200   201   202   203   204   205   206   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Chapter 11: VBA Programming with XML
17_046500 ch11.qxp 12/5/06 5:37 PM Page 249


the information so that it’s easier to read. You can also use XSLT to limit the
amount of information that you see. XSLT transforms XML into something
usable.
Note that you might see two definitions for XSLT: eXtensible 
Style
Language
Transformation and eXtensible 
Stylesheet
Language Transformations. Both
definitions refer to the same technology. I prefer the second form because it
better describes how XSLT works.
This section describes how you can use XSLT to change the way that the
output from your applications looks. After you save your document as XML,
you can present it on a Web site for someone else to see. XSLT can transform
the XML into HTML so that other people can enjoy your work.
XSLT can perform other kinds of transformations, so don’t limit yourself to
the techniques that you see demonstrated in this chapter. For example, you
can use XSLT to create another XML document or even a text file. XSLT is all
about transforming your data into the form that you want rather than forcing
you to accept data in a less-than-optimal form. There’s an excellent XSL tutor-
ial at 
http://www.w3schools.com/xsl/default.asp
. You can also find
a good XSLT reference at 
http://www.zvon.org/xxl/XSLTreference/
Output/index.html
.
Saving your Word document by using XSLT
You can use XSLT to work with any XML file generated by an Office applica-
tion — even the WordML documents created by default with Word (see the ear-
lier “Comparing WordML with Saved XML” section for details). When you use
the Save As dialog box (refer to Figure 11-3) to save a Word document as XML,
you can choose to use an XSLT file to modify the output. (Although this chapter 
provides enough information about XSLT to work with the examples, 
XSLT For
Dummies,
by Richard Wagner, provides additional insights that you might find
helpful.) You might want only the document information or only the document
content. It’s even possible to build a list of all the fonts used in every Word doc-
ument on your machine. Any information that WordML provides is available.
The example in this section helps you overcome one of the problems with the
output options provided with Word. By using XSLT, you can create an HTML
page containing any information about your document. (Even though the XML
Paper Specification, or XPS, file format creates a Web page for your document,
it creates an exact replica of the file and doesn’t present just the data you want
the viewer to see.) This example shows document information, but the tech-
nique works with fonts, options, or the content of the file as well. The main
reason I chose document information is that this particular technique works
well if you want to create a Web site with a listing of all the documents that
you’ve created. Using this technique creates a searchable Web site that’s infi-
nitely easier to mine for data than using the Word documents directly.
250

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   199   200   201   202   203   204   205   206   207




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish