Friday, December 12, 2008

Thursday, August 21, 2008

Numbering and Bulleting In MS Word 2007 docx format

This explains the logic behind Numbering and Bulleting in Docx format.
Important files.

1. document.xml inside folder /word
2. numbering.xml inside folder /word

Inside document.xml you find tag like this


.......................


.......................




.................

Here tag is important , this refers to the information about number or bullets.
Inside numbering.xml you will find tags:

..............

......




Follw0ing three links plays role: <
1. From document.xml//w:p/w:pPr/w:numPr/w:numId/@ w:val
links to
numbering.xml/w:num/@w:numId
2. From numbering.xml/w:num/w:abstractNumId/@w:val
links to
numbering.xml/w:abstractNum/@ w:abstractNumId
3. From document.xml//w:p/w:pPr/w:numPr/w:ilvl/@w:val
links to
numbering.xml/w:abstractNum/w:lvl/@w:ilvl
Seems little trick but well linked.
document.xml has links to and to be selected , while numbering.xml has link to which to be selected.
One more thing, numId in numbering.xml starts from 1 while w:abstractNumId starts from 0.
For any issue not understood , please feel free to mail me.
Cheers!
H!manshu

Wednesday, July 23, 2008

To check type of variable in XQuery

XQuery has a very easy way to check type of variable same as Java.

Use
$variable instance of 'type'
where 'type' can be
xs:string
xs:date
or any type you want to check.

Wednesday, July 16, 2008

Search Using Grep

1. grep -r "keyword" .
here we are searching for the word "keyword" , in current directory and sub-directories.
This will return the list of files and lines which contain this word.
2. grep -lr "modules" .
This will return only list of files .
3. grep -lr "mod.*" .
grep also supports regular expressions

General tag : grep "options" "keyword" "drive specification"

Where options are:

-a All disks.
-c Show the matched characters in Colour.
-f List the File name.
-h Hard disks only.
-i Make the pattern case Insensitive.
-n List the line Number.
-o Only list the file name.
-s Subdirectories.
-x List the lines which do NOT have the pattern in them.

There are many more options , to explore use:
grep man