关于作者

姓名:张会鹏

性别:其他

出生日期:1982-01-06

地区:黑龙江-哈尔滨

联系电话:

QQ:--

婚否:未婚
用户名:flamingheart
笔名:张会鹏
地区: 黑龙江-哈尔滨
行业:其他

日历  

快速登录

+ 用户名:
+ 密 码:

在线留言



友情链接

访问统计:
文章个数:37
评论个数:8
留言条数:2




Powered by BlogDriver 2.1

flamingheart的博客

 

即使是天才,在生下来的时候的第一声啼哭,也和平常的儿童一样,决不会是一首好诗。

文章

XSL的通俗解释

今天在网上看到了一篇文章对XSL进行了通俗易懂的解释:

XSL由两部分组成:

一是转化XML文档;二是格式化XML文档。

如果你不理解这个意思,可以这样想:XSL是一种可以将XML转化成HTML的语言,一种可以过滤和选择XML数据的语言,一种能够格式化XML数据的语言。(比如用红色显示负数。)


XSL可以被用来定义XML文档如何显示,可以将XML文档转换成能被浏览器识别的HTML文件,通常的,XSL是通过将每一个XML元素"翻译"为HTML元素,来实现这种转换的。

XSL能够向输出文件里添加新的元素,或则移动元素。XSL也能够重新排列或者索引数据,它可以检测并决定哪些元素被显示,显示多少。

- 作者: 张会鹏 2005年12月31日, 星期六 10:22  回复(0) |  引用(0) 加入博采

创业有道 8小时之外掘金(转)
8小时之外再工作,被人们视作不务正业,这个传统观念该歇歇脚了。

   在不影响本职工作的前提下,业余兼职正在成为一种时尚。2005年11月,某网站抛出了“当兼职成为流行”的专题调查,根据调查报告显示,有66%的网友选择了有兼职这一选项。

  其中男性和女性比例基本持平。说明业余兼职真的正在成为一种时尚。

  这些业余兼职者,虽然60%的人每周花5~10小时从事兼职工作,但是,兼职收入占总收入50%的人群占到总体比例的70%,而占到100%的则也有10%左右。如今,新兴职业的形成,兼职形式的丰富,提升了兼职人员的素质和含金量。

  对待兼职,政府和企业的态度也在发生积极的变化。

  政府对兼职工作持积极鼓励态度。1999年12月,上海市就出台了《上海市鼓励专业技术人员兼职从事高新技术成果转化工作的试行办法》,详细规定了兼职者、原单位、使用兼职者单位等几方面的权利、义务,明确保护兼职者应该享有的权利。而北京的《中关村科技园区条例》也明确指出:教师和学生兼职、创业合法化。

   在鼓励兼职方面,走在前列的还有浙江省。2004年12月,《北京日报》刊发了一篇题为《浙江兼职政策使1400名北大清华人才“柔性流动”》的文章,讲的就是浙江省的“柔性流动”政策,使清华、北大1400名高级人才进入浙江人才库,这些人可以在浙江潇洒地兼职、印两张名片,领双份薪水,创双倍的业绩。

   在企业方面,越来越多的企业开始对员工的不务正业持宽容态度,甚至允许员工可以利用正常的工作时间干点“私活”。比如著名的跨国公司3M公司,给员工5%的工作时间用于思考与本职工作无关的事情,或者像HP公司那样,工具房永远对员工敞开,即使你是为了私事而使用这些工具也是被鼓励的,而Google允许员工有20%的时间做自己喜欢的事情。

   随着未来远程办公的普及,人们工作时间的越来越灵活,《钱经》据此断言,业余兼职会越来越多。而8小时外掘金,将成为人们赚钱致富的另一个源泉。以下这些人士的成功事迹将告诉我们如何去做。

  8小时之外诞生的首富

  大多数人恐怕没有想到,相当多的亿万富豪是起家于8小时之外的。

  8小时之外淘金,一不小心就成为亿万富豪首推马化腾。马化腾的身价现在大约是20亿元人民币左右。在深圳大学学习的时候,马化腾的电脑技术水准已令老师同学刮目相看,他既可以成为各种电脑病毒的克星,又能为学校电脑网络维护提供不错的解决方案,同时又经常干些将硬盘“锁住“的恶作剧,让学校机房管理员哭笑不得。

  马化腾毕业之后,进入深圳润迅公司工作。他是一个爱折腾的人,业余时间闲不住。他曾经自己投了5万元,在家里搞了四条电话线和8台电脑、承担起一个网站深圳站站长的角色,每天在工作之余忙得不可开交。通过网络,马化腾结识了相当多的朋友,例如网易的丁磊就是他的老友。这对马化腾后来走上创业之路有很大的启发作用:“当年一起喝啤酒的时候,我们只是打工仔而已,都还不知道未来。丁磊后来的成功为我带来了启发,只要去做,没有什么事情是不可能的。”

  业余时间,马化腾还不断为朋友的公司解决软件问题。而他和朋友合作开发的股霸卡在赛格电子市场一直卖的不错。这使他不仅在圈内小有名气,而且也有了相当的原始积累。再加上业余时间炒股票挣来的70多万元,马的创业资金积累超过了100万元。而且,由于经常在网上使用国外的聊天软件聊天,马化腾动了要开发中国的聊天软件的念头。而这笔资金的积累,也让马化腾有了创立腾讯公司、像丁磊那样成为中国互联网巨富的念头。

   1998年10月,马化腾辞职,接着,他创办了腾讯。在决定做聊天软件的时候,国内已经有了两家公司先做,产品比腾讯更有市场名气。马化腾没有想得更多,只是想着赶紧能挣钱,马化腾曾经想把他的项目卖给中华网,后者说要到3万用户才买。现在,他庆幸当初没有贸然行事。现在,他经常这样告诫同行:“要在互联网上掘金就不能只看到眼前利益。许多很有才华的网络人才往往没有注意这一点而失去了长远机会。”

  身价高达102亿美元的丁磊,曾经连续3年成为中国的首富。相当多的人恐怕想不到,丁磊的第一桶金,大约50万元人民币,大部分是8小时之外写辛苦写软件挣下来的。拿着这些辛苦积攒下来的钱,丁磊在一间只有7平方米的房间,开始了自己创业的第一步。

  充分利用8小时之外,还会让你有许多意想不到的收获。比如,柳传志手下的干将之一,弘毅投资公司总裁赵令欢,也是在“8小时之外”与柳传志结上缘分的。

  赵令欢,1984年毕业于南京大学物理系,1987年赴美留学。曾任美国Infolio, Inc., Vadem Ltd.董事长兼CEO,U.S. Robotics Inc.副总裁兼总经理。他在马雪征的引荐下,于2001年下半年,来到联想集团的老办公楼,在那里,他和柳传志第一次握手,并兼职成为联想的“战略顾问”。此后,几乎每个月,赵令欢都飞临北京,约会杨元庆、马雪征,并在北京待上一周为联想集团的国际化“出谋划策”。

  现任百度公司副总裁的梁冬,目前拥有百度12万股期权,价值约1000万美元,他的这笔“横财”绝对是“8小时之外”掘来的。梁冬原来是凤凰卫视的娱乐节目主持人,后来因为偶然的一次机遇,与百度高层相识,并成为百度的顾问。在与凤凰卫视的劳动合同到期之后,梁冬顺理成章地成为了百度的副总裁,并获得了公司0.4%的股权,在百度上市之后,梁冬很快暴富。

  李政道们真正吃饭的地方

  李政道的主要收入来自于他的兼职,而不是他从事的科研工作。在中国人的传统观念里,科学家都是非常本份、老实,视金钱如粪土的人。但是,在革命不忘致富的今天,这个传统观念可要变一变了。

  著名物理学家李政道,有两张名片,一张是“国际华人科技工商协会会长”的头衔,另一张是“利曼兄弟股份有限公司”的职员。李政道博士在递给人们第二张名片时往往说:“这是我真正吃饭的地方。”著名的美国硅谷,也正是因为有了兼职制度,才得以成为全球科技的圣地。

  目前,在中国,利用业余时间开公司,正在成为大学教授的一种选择。李卫武,华中农业大学经济学院教授,虽然是一位普通的硕士导师,却是学生眼中出名的“财富教授”,不仅课讲得特别好,而且拥有中国最大的民营公司——湖北畅响生物技术公司。目前李卫武的身价已经高达4000万元。

  这位出身贫穷的大学教授经历了青年时“结核病”的磨难和那个特殊年代带给他的厄运,同时也把他造就为一个具有超前“赚钱”眼光的经济学者。

  李卫武发现,在他周围有一批专家和教授,他们有强大的研究能力,有发明成果,却搁在实验室不能产业化,相反在美国,大学教授都以开办公司为荣。于是,他在教学之余,琢磨起开公司的事情。在他的牵头下,由美国斯坦福大学与武汉地区部分大专院校、科研院所的专家、教授、博士共同创办的畅响公司,以强大的科技能力和运营能力浮出海面。他们研制开发的畅响EM生物系列产品,将中国生物技术开发应用推向了一个新的阶段。

  据说这是一种可让稻田只长稻子不长草,可让堆积如山的牛粪不见苍蝇飞舞,闻不到一点臭气的产品。该产品在短暂的时间内畅销国内11个省市的1000块区域,每年营业额高达数亿元。

  李卫武掘金的过程,并不顺利。除了曾经出现过的资金周转上的困难,最大的打击来自于他的家庭,一惯支持他的夫人改变了态度,担心他因办公司影响教学、累坏了身体,破坏其在学校的形象和名声,将来的退休金也有可能受到影响。

   但是,李卫武情愿冒这个风险。他担任武大副校长、武汉华软集团董事长的弟弟帮助他解决了大部分资金问题。目前,李卫武个人占有公司20%的股份。“按10元一股市值计算,上市后我有4000万元资产。” 李卫武笑道。

  “钱仅是一个数字,重要的是人的观念转变。”回忆过去的创业经历,李卫武最大的感慨是,“在经营中学到的东西超乎想象,要否定自己许多过时的东西。许多人害怕风险,担心失败,不敢走出固有的生活模式,也就不会收获。”

  李卫武大胆的8小时外掘金,不仅使他拥有了一家成功的公司,他的成功经历更被学校和同事所肯定。而他的经济学课程更受学生欢迎了。

  业余写作成印钞机

  国内文坛“四大金刚”,即国内四个版税收入最高的人——王朔、叶永烈、二月河和海岩中,恐怕只有海岩才会说,“我是一个地地道道的商人,而不是作家。”目前,海岩的正式的身份是:北京昆仑饭店总经理、董事长,锦江国际(集团)公司董事高级副总裁。

  海岩用1/10的时间挣到了9/10的钱。在当今文坛中,海岩的版税达到12%,可以算是最高的。有媒体披露,海岩早已经成为国内为数不多的千万富翁作家。海岩的口头禅:“我写东西肯定要赚钱,如果不给稿费,肯定就不写了”。

  海岩是8小时外写作。“我是比较勤奋的作家。很多人问我,怎么去安排时间。一天24小时,没有什么可安排的,也没有什么可挤的,就这么多。我一直在说,我写作时间是晚上10点以后和早上8点以前,这段时间是我自己的休息时间,我可以自由支配。”

  也许海岩不是中国最好的作家,但他肯定是中国最辛苦的作家。目前海岩已经差不多连续写作10年,中间没有间断过,每年出版的字数在80万字以上。海岩如此高产的一个秘诀是追求“速朽”。“只要把道理说清了,我就不再逐字逐句打磨它。”

  如此多的“产量”,并且又深受市场欢迎,但是海岩一直不愿把自己归结到文化人这个圈里来。他认为自己是旅游行业的一个企业工作者。“我在旅游行业有比较高的头衔和地位的,只不过是大众不了解。大众误以为我是一个作家。”

  除了海岩这种身家千万的业余作家之外,还有许多普通的业余撰稿人,靠8小时外,“写字”赚钱。王刚是北京稿件见报较多的业余撰稿人,他从海岩身上受到了很大启发。

  有一句话他经常挂在口头上,“放假的日子我最忙。”放假期间,他除了偶而打打羽毛球、下一两局象棋放松外,就是满大街跑新闻、在家伏案写文章。近三年来,他的业余时间几乎没有浪费过,一部电视剧他也没有看过。写稿、改稿,直到深夜才结束都是常有的事。他的正式工作虽然换了几个,但是业余的“写作职业”还没有间断。

  王刚经常与报社有联系,还时而接到报社的任务:报社接到社会报料后出于各种原因请就近的通讯员们帮忙调查事实经过,求证事件真相,王刚就成了报社的“编外记者”。虽然报社曾经邀请过王刚“转正”,正式成为报社的记者,但是王刚还是更喜欢这种两栖生活,因为他目前的工作虽然收入不是很高,但是非常稳定。而成为全职记者,他感觉还不成熟,因为记者有时候很辛苦,而且现在工作也不是很稳定。

  对于王刚先生而言,写稿的最大收获就是使人生的价值不断得到提升。长年累月的辛勤劳动总会有甜蜜的收获。他的稿费收入远比工资要高,为了不因为稿费的事而招致同事们的“另眼相看”,他只好将通讯地址分别留在3个地方,还用上妻子和母亲的名字。除收获数量不菲的稿费外,还获得了不少荣誉,甚至超过了本职工作的获得的成就感,工作之外他们的交往圈子扩大了,见识增加了,对社会多了一层理解。

  他们为什么能够成功?

  丁磊、马化腾,他们在成功之前的业余工作中,不仅仅非常幸运的掘到了第一桶金,而且从事的都是自己喜欢的事情,并从中为自己寻找到了未来事业大发展的机会。这是他们日后成功的关键。而且他们从事的行业都是属于IT,而IT正是目前兼职最热的行业之一。这是因为最近人们对IT的热情依然不减,近几年IT业的蓬勃发展,无数创业英雄的巨大成功,令许多人定下了向IT业谋求发展的方向,不是专业出身的人士在如此环境中,多多少少也会接触到许多IT的专业知识和技能。这对他们如今喜欢和想选择IT作为兼职密不可分。小到PC机发烧友、网页制作设计,大到程序编程,“掩盖身份”的IT狂热分子正蓄势待发。马化腾、丁磊的8小时之外的经历告诉我们,从事自己喜欢的事情对于未来的成功很重要,但是,资本的原始积累、第一桶金的获取更加重要,因为这样才能在机会到来的时候能够抓住。

  而教授开公司,在知识经济时代,也会越来越普遍。李卫武的成功在于他抓住了21世纪另一个新兴的高科技产业——生物产业所带来的机会。身处高校环境的他,非常清楚他缺的不是研究人才,而是如何组织这些人才,将这些人才的研究成果产业化,发挥经济效益。他的这一做法,在于洞悉中国教育资源的潜在力量,比别人领先一步对中国教育“沉淀积压”的资源进行了挖掘。另外,这类人的工作时间相对来说比较灵活,有较多的时间可以用来兼职。伴随着中国教育、科技体制的优化和完善,相信教授公司或者“兼职教授”会越来越多。

  海岩的成功在于他的勤奋。他的成功再一次验证了那句古老的格言:道酬于勤。每年80万字的文字,大部分是在晚上10点以后,早晨8点之前完成,肯定不是一般人所能坚持的。如果你也有海岩这样旺盛的精力、持久的毅力、甘于吃苦的精神,那就兼职吧,你将会像海岩那样成功。

  人生的最高境界是什么?有人说,一是做自己喜欢做的事情,二是从自己喜欢的事情中赚钱。

  8小时外掘金,靠如下四点无可比拟的优势,帮助那些苦苦求索的人实现他们的最高境界。一:增加经济收入;二:更充分地发挥个人的能力;三:拓展人生经历,满足个人喜好;四:找到更适合自己的职业。

  如何成功

  8小时外掘金,固然可能创造点奇迹。但不能胡来。以下建议对你有很好的帮助。

  l 要量力而行。著名的思科公司的创始人是美国斯坦福大学的一对教授夫妇。虽然学校允许他们兼职工作,而且在公司创立的初期,他们的兼职对公司的发展起了决定性作用。但是他们明白自己的真正所长是什么,在公司很早的时候,就专门聘请了职业的管理阶层。甚至后来,他们又把自己在公司的股权出售,彻底退出,专心致志研究新的技术。说不定他们正在研究的新技术会哺育出另一个“思科”。

  l 兼职工作不要唯利是图,应该尽职尽责。去年,清华大学经济管理学院魏杰教授辞去新疆屯河独立董事一事,再次引起经济学界的轩然大波。“已经做了差不多3年独立董事,为什么在公司要倒台的时候才选择离去?”据相关媒体披露,目前北京许多知名的经济学家,业余收入高达100万元,二流的经济学家也有几十万的收入。但是他们如此高的收入,备受争议。因为相当多的经济学家已经丧失了学术上的独立性, “独立董事”并非独立,成了企业的代言人。与此同时,经济学家的社会形象未免被蒙上了阴霾。

  l 员工在工作时间之外或公司之外做私活,不要影响到正常的工作绩效,更不要把私活带到公司来做。一旦被发现,有时候后果很严重。譬如联想集团就有“天条”规定:凡联想人一律不得从事第二职业,否则一经发现开除不赦。

  l 从事兼职工作不能侵犯本单位的商业秘密。与本单位有竞业限制约定的员工,不能在同行业从事兼职工作,而只能利用业余时间在与本单位没有竞争关系的企业内从事兼职工作。否则,就要向本单位承担违约责任。

  l 注意保护自己的兼职劳动成果。因为是兼职,并不能与兼职单位形成劳动关系。这样自己的劳动成果有可能受不到法律的充分保护。某设计人员利用业余时间,在一家私营企业兼职从事新产品的设计工作。工作之初,私营企业老板为了支付一些报酬,就口头承诺:“等您的产品设计成功申请专利时,我把专利权分给您一半。”该设计人员信以为真,只领取了很低的一点报酬就为老板设计产品。没想到,产品设计成功后,老板却以企业的名义独揽了专利权。该设计人员在要求专利权应该按约定由自己和企业共有时,却拿不出任何书面证据来,吃了哑巴亏。

- 作者: 张会鹏 2005年12月28日, 星期三 22:01  回复(0) |  引用(0) 加入博采

2005中国搜索年会揭晓15项大奖(转)
 

    12月27日,以“促进搜索应用,提升营销效率”为主题的2005中国搜索年会在北京隆重召开。年会由中国电子信息产业发展研究院主办、赛迪网与赛迪顾问共同承办。基于全国大范围用户调查、用户体验打分,并结合专家评审意见的15项搜索引擎年度大奖在年会上揭晓,《2005-2006年中国搜索引擎市场及投资机会研究年度报告》也新鲜出炉。此外,来自百度、Google、Yahoo 、MSN、新浪爱问、中搜等主流搜索引擎厂商的高层与专家学者,以及行业企业用户和各行各业关注搜索的600多位来宾也在本次年会上齐聚一堂,就搜索引擎的技术创新、发展趋势及应用进行了充分地交流和探讨。

  2005年是互联网搜索引擎快速发展的一年,搜索引擎不再仅仅局限于网页搜索,专业化、本地化是发展趋势,各大搜索巨头都纷纷推出了音乐、图片、新闻、本地搜索等特色服务。面对搜索引擎这块“金矿”,各大厂商百度、Google、MSN、Yahoo、新浪爱问等互联网巨头纷纷跑马圈地,预计分类搜索细分领域的新搜索服务还会不断涌现。面对这样的搜索业界现状,为进一步促进搜索引擎广泛应用,同时也为搜索引擎厂商改进自己的产品提供第一手的用户数据,赛迪网联合赛迪顾问,以关注搜索引擎用户应用为核心,通过网上搜索大赛、年度用户调查和用户体验打分三种形式,将目前中国市场上所有主流的搜索引擎悉数摆在网民面前,旨在用最客观的手段由用户自己评价和选择所喜爱的搜索引擎产品和品牌。通过广泛的网上网下宣传,吸引了超过15万网民参与其中,采集了大量有效用户数据,也保证了搜索引擎研究报告和年度大奖的客观性、公正性和权威性。

  根据年度搜索引擎发展技术的最新特点和目前搜索引擎的应用现状,第四届互联网搜索大赛本着推进搜索引擎应用的主旨,在赛题方面包括社会人文、地理历史、政治经济、体育娱乐、生活休闲等各领域知识信息,以此比拼网民搜索引擎的应用技能。

  用户体验打分将搜索分为综合类网页搜索、音乐搜索、本地搜索、图片搜索、新闻搜索、问答搜索等几大类别,把被测试的若干家搜索引擎的品牌、名称或其它可以识别的内容隐藏起来,让用户根据使用体验打分,因此也被称为“盲测”,这种方式可以非常客观地检验出搜索产品的用户满意度。本次盲测的结果也是颁布搜索引擎年度大奖的依据之一。

  为保证本次用户调查更为科学严谨,组委会特别邀请了多位互联网专家参与调查问卷的设计,分别设计了网上调查问卷、电话调查问卷和短信调查问卷,回收总量超过13万份,为推出重量级年度报告打下了坚实的基础。

  本次线上活动自2005年11月21日开始,12月21日结束,历时一个月,国内百家大中型主流网站全程参与了本次活动,另有三千多家中小网站鼎力相助,中国计算机报等30余家平面媒体推广助威,本次活动还专门开通了WAP网站,全面构成立体宣传攻势。通过在QQ和MSN上的传播推广,使大赛信息覆盖超过1亿用户。15万网民注册参与线上公测,这一切使本届年会成为2005年度中国搜索市场上名副其实的参与者最多、规模最大、影响力最广泛的一次搜索盛会。为体现结果的客观公正,所有参与打分或提交问卷的网民必须线上注册,主办方通过对注册用户的数据分析发现,本次参与测试的用户基本覆盖了各个年龄、学历、职业阶层,从地域上来讲,基本涵盖了中国所有行政区域,还有部分来自我国香港、台湾地区的网民和国外网民也参与了活动,可以说本次活动是中国网民对国内现有搜索引擎的“真实民意体现”。赛迪网总裁徐东英女士说:“赛迪网承办此次活动是以第三方的角度牵头搭台,在整个策划的自始至终,我们的心中充满了一份激情的狂热,期望用自己的智慧设计出合理的形式,以对中国搜索市场进行一次客观的梳理!”

  本次活动最终评出15个年度搜索引擎奖项,其中百度获“用户量最高”、“最高效”、“最佳音乐”、“最佳图片”和“最佳搜索工具栏”奖;Google获“用户最高满意度”和“多元化发展”奖;中国Yahoo获“最佳娱乐”奖;中搜捧得了“技术创新”和“最佳桌面”奖;新浪爱问获“最佳本地搜索”和“最佳问答搜索”奖;MSN中国获“技术进步”奖;腾讯获“最有潜力”奖;网易获“商业进步”奖。

  对于第四届互联网搜索大赛暨2005中国搜索年会的成功举办,与会的各界人士给予了高度评价,他们称这一活动融焦点性、专业性、客观性、互动性与前瞻性于一体,是今年互联网产业中最吸引人们眼球的一次盛会,不仅有利地推动了中国搜索引擎应用的发展,而且也客观的对搜索引擎进行了评价,对了解整个中国搜索引擎市场现状和发展趋势有非常重要的意义和价值。本次活动为2005年中国的搜索市场又添了一笔浓墨重彩!

 

附15项大奖获得者:

2005年度用户量最高搜索引擎奖 百度 2005年度用户最高满意度搜索引擎奖 Google 2005年度最高效搜索引擎奖 百度 2005年度最佳音乐搜索引擎奖 百度 2005年度最佳本地搜索引擎奖 新浪 2005年度最佳图片搜索引擎奖 百度 2005年度最佳问答搜索引擎 新浪 2005年度桌面最佳搜索引擎奖 中搜 2005年度最佳娱乐搜索引擎奖 雅虎中国 2005年度最佳搜索工具栏奖 百度 2005年度搜索引擎技术创新奖 中搜 2005年度搜索引擎技术进步奖 MSN中国 2005年度搜索引擎商业进步奖 网易 2005年度搜索引擎最具潜力奖 腾讯 2005年度搜索引擎多元化发展奖 Google

- 作者: 张会鹏 2005年12月28日, 星期三 09:28  回复(0) |  引用(0) 加入博采

VML极道教程
今天在网上找到这个教程,实在是太好了,是我有史以来看到的最好的教程。

- 作者: 张会鹏 2005年12月27日, 星期二 22:48  回复(1) |  引用(0) 加入博采

A Family Affair(转自互联网,关于XML)

今天在网上找到一篇好文章,解决了我几天来的困惑,请看红色部分。

XML-Based Rendering Languages

To say that you are a human being is like saying that a particular document is an XML document. Both statements lack precision. Obviously, you are a member of the human race but, more particularly, you are a person, you speak a particular language, you live in a particular place, and so on and so forth.

Similarly, an XML document is, more particularly, an implementation of a domain language. We should not forget that XML is a meta language that allows you to create a particular domain language. XML does not specify the vocabulary per se, but it provides some syntax rules. It's like having all the spoken languages of this world being based on the same alphabet and the same basic grammatical rules, but being spoken with different words and different inflections.

This week, we'll take a closer look at a particular family of XML-based domain languages: the rendering languages. These languages' vocabularies represent visual or audible objects. Interpreters of rendering languages take as input an XML-based rendering language, transform its elements into visual or audible objects, and make these objects accessible to our senses. We are used to calling these interpreters browsers or viewers, but, to be more precise, let's call them rendering language interpreters.

Presenting the Family: XHTML

The eldest son of this proud family is XHTML, who's just coming out of his difficult adolescent years. We used to call him HTML, but he no longer likes that name. Some say that XHTML is still in a teenage crisis.

XHTML became a rendering language by tradition, not by design. The people behind the Mosaic browser decided how a <h1> or a <p> element should look. Then Netscape and Microsoft built on the Mosaic heritage. It wasn't decided by a committee, nor set down in a recommendation. Nowhere was it explicitly mentioned that an <h1> element is displayed by default with this particular font, size, or any other visual characteristics. HTML became a de facto rendering language. When it grew up and became XHTML, it inherited the same visual characteristics it acquired in childhood.

Increasingly in web development, the XHTML language will become important in the context of using the XSLT transformation language. XSLT is used, as you know, to transform an XML tree into something else. This "something else" may be an XHTML tree.

Client-side transformations

When the transformation from XML to XHTML occurs at the client side, the browser requires:

  • an XSLT engine to transform the XML document into XHTML

  • an XHTML interpreter to parse, interpret, and display the visual objects

Thus, the browser includes at least two interpreters. (In most cases it has a third, non-XML one -- the CSS style interpreter.)

Now, what about the document model? How do client-side transformations affect your ability to script your document in a browser? Using XHTML as a rendering language, there are potentially three XML documents that can be accessed on the client side, after an XML document is transformed into XHTML using XSLT:

  1. The original XML document

  2. The XSLT document

  3. The XHTML document

Microsoft's Internet Explorer 5, currently the only browser in which client-side XSLT transformations are practical, provides access to all three documents from the same document model. If a JavaScript has to access one of these documents, it can do so using the document object -- the document object being, of course, the XHTML document, as a result of the XSLT transformation (not totally XHTML compliant, but let's keep that for another story).

To access the XSLT document (itself an XML document), we simply have to use a JavaScript expression like TheXSLTDocument = document.XSLDocument. Similarly, the XML document can be accessed with the TheXMLDocument = document.XMLDocument. The resultant XHTML document object includes the XSLT and XML documents as components.

We ought to mention here that IE is not yet compliant with the XSLT 1.0 recommendation. Of course, we all know that IE is still an evolving species. What is interesting in the Microsoft implementation is the fact that the three documents are available from the scripting language. The scripting language can dynamically change at run-time any of the three XML document object models.

Let's hope that the DOM3 working group will take into account more sophisticated structures like this, and that the next DOM3 recommendation will bring a standard way to access multiple DOM or sub DOMs or, put differently, to access the components of a new breed of compound documents as presented above.

SVG

Now let me introduce to you another W3C offspring with a promising future: SVG (Scalable Vector Graphics). The SVG language has been designed from the ground up as a rendering language. Each of its visual objects are defined in a recommendation. As is the case for XHTML, an SVG interpreter decodes and renders the SVG visual elements. But the visual capabilities of SVG outshine those of XHTML.

In addition to being a rendering language, SVG also offers an API that can be used to directly manipulate the SVG visual objects. The SVG recommendation introduces new interfaces to be added to the default XML DOM interfaces. Thus, for instance, an SVG <path> element is:

  • a Node object

  • an Element object, since the Element interface inherits from the Node interface

  • an SVGElement object, since this interface inherits from the Element interface

  • an SVGPathElement object, since this interface inherits from the SVGElement interface

Thus an SVGPathElement inherits the characteristics of several parents, and presents a more sophisticated object model. A path element's object counterpart offers XML DOM and SVG DOM interfaces.

Again, if an SVG fragment is embedded in an XHTML document as the result of an XSLT transformation, we end up with a pretty sophisticated document object model.

XSL

Another family member is named XSL. It is also known as "XSL-FO." This rendering language has been designed from the ground up to provide a visual model for documents. It has no special DOM and actually can only be interpreted, or its elements accessed, with the default XML DOM. Its visual objects allow quite sophisticated page layouts. I got into an interesting discussion about this topic with Jon Smirl, an XML-DEV community member, over the suggestion that an XSL-FO implementation could be made to use the SVG DOM to visually render the XSL-FO elements. An interesting point of view, and one which highlights the fact that a rendering language that also offers an API can be used as a tool to implement an interpreter for another rendering language.

WML

Time for us to meet the noisy kid of the family. This kid is growing rapidly, and his exploits are making the news headlines. They're becoming more and more well-known, especially in Europe where the cell phone market is booming. You probably recognize what I am talking about -- WML (Wireless Markup Language).

With WML, we are in the land of "visual efficiency." This language uses the card metaphor to download several pages at a time into a cell phone. Because of the reduced rendering capabilities of cell phones, this language does not offer a rich visual model, but a model sufficient to render the information in the most efficient way when only a couple of text lines can be displayed.

Audible Rendering Languages

Finally, the hoped-for child in the family is an audible rendering language. Several proposals are still on the table, but there are not yet any official W3C recommendations. Let's hope that this year we'll have a new-born rendering language. "Why?" I hear you ask. Simple enough. I do not want to be in front of a motorist who reads his web pages on a visual browser. I'd prefer one that listens to his web pages.

Conclusion

Resources

XHTML
XSLT
SVG
XSL
WML
Voice browsers

As we get ever more diverse rendering targets, the number of different rendering languages is likely to increase. We're still in the early stages of determining the required support for these in the XML infrastructure. When the target document is generated by a transformation process, we can see that the picture gets even more complicated!

Unfortunately, I haven't been able to introduce you to the whole family of existing rendering languages in this article -- they're a prolific bunch. I just presented the ones making the loudest noises in this XML developer's house.

- 作者: 张会鹏 2005年12月27日, 星期二 13:08  回复(0) |  引用(0) 加入博采

踏破铁鞋无觅处,得来全不费功夫

昨天终于解决了template标签的属性mode不起作用的问题。我在CSDN和中国XML论坛分别发帖子求助,令我高兴的是,两个论坛都给了我满意的答案,原来是命名空间不对,我用的是W3C在98年推出的一个草案,至此,困扰了我一两天的难题终于得到了解决。后来我看了一下XML中国论坛编写的那本《XML实用进阶教程》哪本书,原来答案就在书上。在书中149页中间“xsl:stylesheet元素必须包含有version属性,用以指示该XSL文档遵从哪一个版本的XSL标准。另外,xmlns:xsl指示了XSL的命名空间,在XSLT标准中,定义了XSLT的命名空间为http://www.w3.org/1999/XSL/Transform。请注意在前面的例子6-14中所使用的XSL命名空间是http://www.w3.org/TR/WD-xsl,目前IE5只支持这个命名空间。”

在书中174页中间“IE5同时支持XSLT,可以实时地将一个XML文档根据XSL样式单转换为HTML文档并显示。不过,IE5对XSL的支持还只是根据W3C于1998年8月制订的XSLT草案提供支持,一年来,XSLT从一个草案到最后的正式推荐标准经过了许多修改完善,这些修改还没有及时反映到IE5中。”

原来答案就在书中,看来书看的还是不够细啊。

- 作者: 张会鹏 2005年12月27日, 星期二 13:00  回复(0) |  引用(0) 加入博采

怎样用c++的流实现把一个文件的内容一次读到一个string中?

我的一个做法是:

ifstream in("test.txt");

in.seekg(0, ios::end);
int len = in.tellg();
in.seekg(ios::beg);

char* str = new char[len];
in.read(str, len);

- 作者: 张会鹏 2005年12月25日, 星期日 14:57  回复(0) |  引用(0) 加入博采

有感于某些科技图书的翻译质量
最近仔细研读Richard Stevens的《Unix环境高级编程》中文版,把我郁闷坏了,这确实是一本非常好的书,可以说是学习Unix编程的最好书籍。可是不幸的是,这本书被译者给糟蹋了,这本书的译者是上海交通大学计算机系大名鼎鼎的尤晋元教授,名头一大堆,可是给我一种感觉就是这哥们小学语文没学好,翻译的东西满篇都是语病,读起来都不通顺,且不说很多技术上翻译错误或不准确的地方了。其实不通顺也可以忍受,可是这种不通顺很多时候曲解了作者的意思,给读者造成了极大的阅读上的困难。其实我一直不太赞成大学教授翻译技术书籍,他们多半其他的事情太多,无暇钻研技术,写书译书只是为了达到其他的目的,翻译完就了事,就什么都不管了。我觉得国内的技术作家都应该好好向候捷先生学习,人家把译作当成是艺术品,精益求精,还专门在个人网站上提供出版后的后续服务,国内还有一些实力派译者也很不错。我最看不惯的就是一整就一本书一大堆译者,你一章我一章,所谓“团队精神”,其实这种翻译方法质量上很难保证,有时候前后术语都不一致。我衷心希望出版社以后不要急功近利,多出些高质量的书籍,不要在糟蹋那些领域内的名著了。

- 作者: 张会鹏 2005年12月18日, 星期日 21:07  回复(1) |  引用(0) 加入博采

Lighting Up on Windows Vista(转)

Lighting Up on Windows Vista

10 things you can do to make your application shine when it runs on Windows Vista.


 

For additional information about developing for Windows Vista, see the SDK and the MSDN Windows Vista Developer Center.

The information on this site is designed to help developers prepare for Windows Vista. Technical details and documentation are based on current development plans, and may be incomplete or subject to change. As Windows Vista progresses beyond Beta 1 toward subsequent preview versions and final release, return to this site for updates and more complete details on how to create applications that take full advantage of Windows Vista.

1. Follow the Windows Vista style guidelines

Create a great-looking Windows Vista application by using the common file dialogs and by providing high-resolution icons, preview controls, and live icons for the shell.

Windows Vista offers a new "look and feel" (user experience) for users, including new common controls, translucent frames, a page navigation paradigm, and a standard search feature. By following the Windows Vista style guidelines, developers can provide their users with a consistent and predictable user experience (a draft version of the Windows Vista style guidelines will be available soon).

Windows Vista provides new controls that developers can use to provide a consistent experience for specific types of interaction.

  • The new Common File Dialogs (IFileDialog, IFileDialogCustomize) enable developers to provide new search and organize capabilities when prompting users to open and save files. (See Enable users to visualize, organize and search)
  • The updated Windows Vista Wizard Framework (a Wizard created with the new PSH_AEROWIZARD flag set) provides developers with a mechanism for offering more customized UI through replacing default command buttons with context-relevant text, resizable pages, and custom background graphics.
  • Task Dialogs provide a more contextual and flexible alternative to the much-used MessageBox API, including support for hyperlinks and customizable button labels and icons.
  • Rich Preview Handlers (IPreviewHandler, ITextHightlight, IPreviewHandlerVisuals) provide in-place interactive previews of document content in common dialogs and search results.
  • Live Icons (IThumbnailProvider) allow developers to build high resolution (256 x 256, 32bpp color depth) icons, customized per document to show a preview of that document's contents

Related sessions from PDC 2005

  • PRS319 Building Applications That Look Great in Windows Vista
  • PRS310 Windows Vista: Extending Explorer by Providing Metadata, Rich Previews and Thumbnails for Your File Types
  • DAT307 Windows Vista: Exploiting New Capabilities for Search and Organization

More Information

2. Enrich the user experience

Use Windows Presentation Foundation to create engaging interfaces with multimedia, vector graphics, animation, and content composition.

The Windows Presentation Foundation (WPF) unifies the way developers and designers experience documents, media, and UI, providing a single runtime for browser-based experiences, forms-based applications, graphics, video, audio and documents. Central to the WPF framework are controls that provide the building blocks for developing next generation user experiences.

  • Animation (System.Windows.Media.Animation)
  • Vector graphics (System.Windows.Media.Drawing, System.Windows.Shapes)
  • Audio and video (System.Windows.Media)
  • 3D (System.Windows.Media.3D)
  • Advanced text rendering and document support (System.Windows.Documents, System.Windows.XPS, System.Printing, System.Windows.Media.TextFormatting)

WPF's programming model makes user interfaces simpler to develop and easier to maintain. XAML (eXtensible Application Markup Language) is used to better separate user interface layout and composition from logic.

Related sessions from PDC 2005

  • PRS305 Windows Presentation Foundation ("Avalon"): A Lap around the Windows Presentation Foundation
  • PRS309 Windows Presentation Foundation ("Avalon"): Overview of Windows Vista Graphics
  • PRS314 Windows Presentation Foundation ("Avalon"): Using Application Services
  • PRS309 Windows Presentation Foundation ("Avalon"): Overview of Windows Vista Graphics
  • PRS324 Windows Presentation Foundation ("Avalon"): Using Data in Your Windows Presentation Foundation ("Avalon") Applications: XML, Windows Communications Foundation ("Indigo"), ADO.NET, and More
  • PRS329 Windows Presentation Foundation ("Avalon"): Building User Interface with Advanced Layout Techniques

More Information

3. Enable users to visualize, organize, and search

Provide metadata for your file formats, enable search, and organize within your applications.

Windows Vista changes how users interact with their files, messages, and other items. With new concepts such as virtual folders, stacks, grouping, and filtering, users are no longer restricted to only using folders as a way of organizing their content. Developers can take advantage of these new concepts and capabilities in your applications, and you can ensure that the data your applications create is prominent in the visualization, organization, and search experience.

Developers can use many of the Windows Vista search and organization features directly from within your applications:

  • The OLE DB Provider for Windows Search can be used to issue queries against the Windows Vista search engine. Helper APIs can be used to convert from Advanced User Syntax to the OLE DB query string format.
  • Developers should use the Common File Dialogs to prompt users for opening and saving files to provide a uniform experience around search and metadata; the new common file dialogs also provide many options for customization and custom event handling.
  • Host the Windows Explorer and Namespace Explorer controls to provide users with the same virtual folder, grouping, and stacking experience as in the shell.

    Applications with custom file formats can integrate with the Windows Vista visualization, organization, and search functionalities through the following extensibility mechanisms:

    • Property Handlers enable metadata support for custom file formats.
    • Full-text search can be enabled for custom file formats by implementing the IFilter interface.
    • Preview handlers provide a rich, interactive, read-only preview when a file is selected in the Windows Vista Document Explorer. (Note: more information on preview handlers will be available in the Beta 2 timeframe.)
    • Live Icons and Rich Preview Handlers (see Follow the Windows Vista style guidelines)

    Related sessions from PDC 2005

    • DAT307 Windows Vista: Exploiting New Capabilities for Search and Organization
    • DAT322 MSN Search: Building Web and Desktop Search into Your Applications
    • OFF320 Developing with Microsoft Office System Search Technology

    More Information

    http://msdn.microsoft.com/windowsvista/discoverable/

    http://addins.msn.com/devguide.aspx#AddingaNewFileType

4. Run securely

Use Least-privileged user accounts and limit elevation requests; express demands and limitations using Code Access Security.

Windows Vista provides new mechanisms to help protect users from elevation of privilege attacks, and allows developers to minimize the damage that can result from security vulnerabilities in your code. Ensure that applications run under least-privileged accounts in order for their users to take full advantage of these mechanisms.

  • Privilege-elevation APIs should be used when a higher privilege action is absolutely necessary.
  • Code Access Security is a mechanism for developers to specify the set of operations your code should be allowed to perform, as well as the operations your code should never be allowed to perform.

Encrypt your data and communications using the new Cryptography Next Generation (CNG) framework. This framework provides an easier programming model and includes new advanced cryptography algorithms. It also allows custom cryptography algorithms to be plugged into CNG via a simple extensibility mechanism.

Windows Vista integrated role-based security can be added by using the revamped Authz API.

Parental Controls (IWindowsParentalControls) in Windows Vista allow parents to set application usage policies for different user accounts. Applications should use these APIs to determine what restrictions parents have requested on overall usage and Web content, and log any related events that parents may wish to audit.

"Infocard" is Microsoft's implementation of an Identity Metasystem, enabling users to choose from a portfolio of identities that belong to them and use them in contexts where they are accepted, independent of the underlying identity systems where the identities originate and are used. Developers should use "InfoCard" to allow users to securely choose the most relevant security credentials.

Related sessions from PDC 2005

  • FUN304 Windows Vista: Enabling Parental Controls in Your App
  • FUN210 Windows Vista & "Longhorn" Server: Understanding, Enhancing, and Extending Security End-to-End
  • FUN406 Windows Vista: User Account Protection—Securing Your Application with Least Privilege Administration
  • COM214 Identity, Access, "InfoCard," and the Identity Metasystem

More Information

http://msdn.microsoft.com/windowsvista/security/

http://msdn.microsoft.com/windowsvista/building/infocard/default.aspx

5. Design for reliability and manageability

Use the new event logging for monitoring, troubleshooting and analysis of events; make your application easy to deploy by using Windows Installer and ClickOnce.

A reliable application is one that behaves exactly as its user expects it to. Windows Vista offers an extensive set of new APIs and developer services to make your applications predictable and manageable to end users and IT professionals, and to diagnose them when they are not.

  • Event Logging System have been rewritten for added performance and scalability.
  • Cancelable I/O allows for the asynchronous cancellation of I/O requests, and the detection of when a device is not responding to a cancellation request.
  • The Transactional File System and Registry allow read/write operations to integrate with System.Transactions.
  • Restart Manager reduces the need to reboot the PC by giving applications and services the ability to "freeze-dry" their state, before being stopped by Windows Vista so that installations can update shared files.
  • WS-Management allows for the remote management of server hardware.
  • Function Discovery (FD) allows applications to discover the capabilities of new hardware and software added to the system.
  • Microsoft Management Console (MMC) 2.1 supports writing .NET snap-ins using Windows Forms.
  • Rights Management provides the ability to protect and authenticate data and files using Digital Rights Management technology.
  • Task Scheduler 2.0 provides the programmatic creation and scheduling of tasks.
  • Application Recovery enables applications to control what actions are taken on their behalf by the system when they fail.
  • Windows Installer 4.0 brings new features to Windows Vista including Multi-User Install (MUI) shortcuts, registry entries, shell extensions and LUA Patching.
  • ClickOnce, updated for WinFX, is the best choice for Smart Client deployment.
  • Provide Monad commandlets to enable simple, scriptable management by IT professionals.

Use the Vista Network Diagnostic Framework (NDF), an extension of the Windows Diagnostics Infrastructure (WDI) that supplies the infrastructure that networking components use to convey status information:

  • Report error conditions that are raised as error events by WDI and entered into the Windows Event Log by ETW.
  • Enable NDF to trace dependent components, and determine the status of these components. If the components are offline or malfunctioning, Windows Vista may be able to automatically repair the problem.

Related sessions from PDC 2005

  • FUN222: Windows Vista: What’s New in Software Installation for Windows Vista: Exploring the Windows Installer (MSI) and ClickOnce Options
  • FUN320 Windows Vista & "Longhorn" Server: Improving Reliability Using System.Transactions and the Transactional NTFS and Registry
  • FUN301 MMC 3.0: Developing Managed-Code Snap-Ins
  • TLN303 Monad: Advanced Command Line Scripting
  • FUN311 Windows Vista & "Longhorn" Server: Developing Manageable Applications
  • FUN316 Windows Vista & "Longhorn" Server: Publishing and Consuming Events
  • FUN315 Windows Vista & "Longhorn" Server: New Performance Counter Infrastructure and Data Collection
  • FUN308 Windows Vista & "Longhorn" Server: Developing Rock Solid Reliable Apps

More Information

http://msdn.microsoft.com/windowsvista/deployable/

6. Establish a customer feedback loop

Use the Windows Feedback Platform to research and analyze application failure via the Windows Developer Portal.

Windows Vista provides an extensible error-reporting environment, integrated with a developer portal for viewing application reports. Developers can collect the data needed to determine the top issues experienced by users running their applications, and then use the provided debug data to implement fixes.

  • Windows Error Reporting (WerReportCreate, WerReportSubmit) in Windows Vista adds new abilities such as hang reporting and leak detection to help improve the quality of applications. (WerReportCreate)
  • Developer Portal is the point of access for developers to receive behavioral information about an application and request more detailed information from end users when needed.

Related sessions from PDC 2005

  • FUN313: Windows Vista: Forensic Debugging: Improving Code Quality Through Windows Feedback Services

More Information

http://msdn.microsoft.com/windowsvista/reliability/#feedback

7. Build for connected systems

Use Windows Communication Foundation to build connected systems that provide secure, reliable transacted interoperability; take advantage of workflow technologies to enable flexible workflow in applications.

Windows Communication Foundation (WCF) is a new breed of communications infrastructure built around the Web services architecture. Advanced Web services support in Windows Communication Foundation provides secure, reliable, and transacted messaging along with interoperability. It unifies a broad array of distributed systems capabilities in a composable and extensible architecture, spanning transports, security systems, messaging patterns, encodings, network topologies, and hosting models. Key WCF functionality is provided through the System.ServiceModel and System.ServiceModel.Security namespaces.

For applications that require real-time communication and collaboration across distributed networks, developers can use both the WCF PeerChannel, and the updated Peer-to-Peer Infrastructure based on Peer Name Resolution Protocol (PNRP).

Use the Windows Vista Filter Platform to easily write network packet inspection, monitoring, and modification solutions.

Use the Winsock Kernel (WSK) component programming model to acquire an easier method of kernel-mode access to network services.

Windows Vista includes a new IPv6 stack that provides next-generation networking capabilities. Making your application IPv6 ready will allow it to run on next generation networks, traverse NATs and firewalls, and connect peer-to-peer. Quality of Service (QoS) technologies manage the transmission of particular types of data—for instance, streaming media—to ensure that data is transmitted at the right time with the right speed. Windows Vista extends QoS functionality by adding network awareness and greater user-friendliness through the quality Windows Audio Video Experience (qWAVE) package and a new implementation of the Network Location Awareness Service (NLA2).

Related sessions from PDC 2005

  • COM304 Networking: Building IPv6, Firewall, and IPsec Aware Applications
  • COM202 Windows Communications Foundation ("Indigo"): A Lap around the Windows Communications Foundation
  • COM305 Windows Communications Foundation ("Indigo"): Integrating COM+ and MSMQ Applications
  • COM308 Windows Communications Foundation ("Indigo"): Developing Manageable Web Services
  • COM312 Windows Communications Foundation ("Indigo"): Writing Secure Distributed Applications
  • COM307 Windows Communications Foundation ("Indigo"): Writing Reliable and Transacted Distributed Applications
  • COM423 Windows Communications Foundation ("Indigo"): Web Services Interoperability with Java/J2EE
  • COM311 Developing P2P Applications Using Windows Vista and the Windows Communication Foundation ("Indigo") PeerChannel
  • COM304 Networking: Building IPv6, Firewall, and IPsec Aware Applications
  • COM210 Introduction to Workflow in Windows Applications
  • COM328 Extending Workflow Capabilities with Custom Activities

More Information

http://msdn.microsoft.com/windowsvista/connected/#wcf

8. Bring data to the user with RSS

Use the Windows Vista RSS feed APIs, common feedlist, shared data store, synch and parsing engines, and list extensions to RSS.

Windows Vista includes new RSS platform components that enable your application to easily consume RSS feeds. If your application or service provides data that periodically changes or updates, or to which users might want to subscribe, you should consider exposing that data as RSS. If your application enables users to consume and subscribe to information sources, you should enable your users to subscribe to information exposed via RSS. If users will want to consume your information listed in order other than chronological (for example, wish lists or photo albums), you should support the RSS list extensions.

The key features of the RSS platform are:

Unified Feed Parsing API
Your application can access feeds in a consistent manner, without having to worry about parsing all of the different flavors of RSS 0.9x, RSS 1.0, RSS 2.0, Atom 0.3, and Atom 1.0.  The feed parsing API makes it easy to access list extensions and custom metadata such as geocoding or ratings on feed items.

Shared Feed List (IFeeds)
If a user subscribes to a feed in one application, such as Windows Internet Explorer 7, that feed will be available to all other applications, including yours.  If your application subscribes to a feed, other applications will be able to access the same feed.

Automatic Download for Enclosures
The RSS platform automatically handles download of media enclosures such as video, photos, or audio podcasts for you.  Downloads run automatically in the background, prioritizing to use bandwidth when you aren’t using it for other purposes.

Related sessions from PDC 2005

  • DAT320 Windows Vista: Building RSS-Enabled Applications

More Information

http://msdn.microsoft.com/windowsvista/integrated/#rss

RSS developer center on MSDN

9. Make document data accessible

Use the open XML file format used by XPS and Office 12 to make documents easier for users to find, manage, and create—using platform support.

New XML-based document packaging technologies in Windows Vista (System.IO.Packaging, System.Windows.Xps.Packaging) make it possible to share and integrate document data in new ways. Windows Vista reach packaging technologies are based on the XML Paper Specification (XPS) that details a design for new self-describing information formats. The WinFX runtime includes the XPS package APIs that enable developers to more easily create and process XPS-based containers or files.

  • Package Support gives developers a base on which to create custom file types that can take advantage of DRM, Digital Signatures, and ZIP Compression.
  • The XML Paper Specification (XPS) is the standard way to store portable document information in Windows Vista.

Related sessions from PDC 2005

  • DAT304 Unleashing the Power of XPS-Based File Formats for your Application
  • OFF304 Assembling, Repurposing and Manipulating Document Content Using the New Office File Format
  • PRS333 Windows Presentation Foundation ("Avalon"): Advances in Document Workflow: Securing, Viewing, and Printing Your Content

More Information

http://msdn.microsoft.com/windowsvista/integrated/#xps

10. Build for mobility

Use the new auxiliary display, advances in power management and network awareness APIs.

Use the Network Awareness libraries to create a seamless user experience for your customer’s mobile experience. These libraries allow location detection based on network characteristics and allow you to automatically adjust application settings accordingly.

  • When an application has been disconnected and is attempting reconnection, implement the automatic synchronization capability (API).
  • Network Location API 2(NLA2) provides a single place where developers can write a module in their application to retrieve all the network parameters for a machine. The API will also notify the application whether the parameters have been changed and notify the application of some network context information.

Use Device Synch and Conflict Resolution to add robust synchronization and conflict resolution to your mobile application:

  • The Synchronization Manager includes UI components, such as the tabbed dialog boxes in the Synchronization Manager service, error dialogs, and progress dialogs.

Use the Pen and Ink API to take advantage of Windows Vista’s powerful handwriting features, and enable a great user experience for TabletPC users.

Use the Aux Display API to allow your users to easily see the information that is most important without entirely powering up their device:

  • Windows Vista Aux Display provides an API for applications to send content and notifications to devices, receive events from devices, device connection and management, and control panel settings to allow users to control their auxiliary device settings.
  • The auxiliary display platform is connection agnostic. It doesn’t matter whether an auxiliary display is connected through USB, Bluetooth, TCP/IP, or other future protocols, as long as the appropriate user mode auxiliary display transport driver is present.
  • Additional filter drivers can be added that convert the auxiliary display content format into something that can be understood by the specific device.

Use the new power management libraries and notifications to improve battery life and allow users to continue using your application longer:

  • WM_POWERBROADCAST lets your application gracefully deal with sleep and hibernation states when power is low.
  • Use Windows Vista’s monitoring system resources and end-user input to detect when the system is being actively used to write applications that are faster and more efficient by only powering down hardware when it is truly idle.

Related sessions from PDC 2005

  • PRS308 Windows Vista: Reaching Your Users When Their Machine Is Off, Using Auxiliary Display Devices
  • PRS315 Windows Vista Tablet PC: Advances in Creating Tablet Enabled Applications
  • DAT317 Windows Vista: Centralizing Data Synchronization with the New Sync Center
  • FUN319 Windows Vista: Developing Power-Aware Applications

More Information

http://msdn.microsoft.com/windowsvista/mobile/

Top of Page Top of Page

- 作者: 张会鹏 2005年12月18日, 星期日 11:47  回复(0) |  引用(0) 加入博采

关于extern "C"(转)
链接指示符extern C
如果程序员希望调用其他程序设计语言尤其是C 写的函数那么调用函数时必须
告诉编译器使用不同的要求例如当这样的函数被调用时函数名或参数排列的顺序可能
不同无论是C++函数调用它还是用其他语言写的函数调用它
程序员用链接指示符linkage directive 告诉编译器该函数是用其他的程序设计语言
编写的链接指示符有两种形式既可以是单一语句single statement 形式也可以是复
合语句compound statement 形式
// 单一语句形式的链接指示符
extern "C" void exit(int);
// 复合语句形式的链接指示符
extern "C" {
int printf( const char* ... );
int scanf( const char* ... );
}
// 复合语句形式的链接指示符
extern "C" {
#include
}
链接指示符的第一种形式由关键字extern 后跟一个字符串常量以及一个普通的函数
声明构成虽然函数是用另外一种语言编写的但调用它仍然需要类型检查例如编译器
会检查传递给函数exit()的实参的类型是否是int 或者能够隐式地转换成int 型
多个函数声明可以用花括号包含在链接指示符复合语句中这是链接指示符的第二种形
式花招号被用作分割符表示链接指示符应用在哪些声明上在其他意义上该花括号被忽
略所以在花括号中声明的函数名对外是可见的就好像函数是在复合语句外声明的一样
例如在前面的例子中复合语句extern "C"表示函数printf()和scanf()是在C 语言中写的
函数因此这个声明的意义就如同printf()和scanf()是在extern "C"复合语句外面声明的
一样
当复合语句链接指示符的括号中含有#include 时在头文件中的函数声明都被假定是用
链接指示符的程序设计语言所写的在前面的例子中在头文件中声明的函数都是C
函数
链接指示符不能出现在函数体中下列代码段将会导致编译错误
int main()
{
// 错误: 链接指示符不能出现在函数内
extern "C" double sqrt( double );
305 第七章函数
double getValue(); //ok
double result = sqrt ( getValue() );
//...
return 0;
}
如果把链接指示符移到函数体外程序编译将无错误
extern "C" double sqrt( double );
int main()
{
double getValue(); //ok
double result = sqrt ( getValue() );
//...
return 0;
}
但是把链接指示符放在头文件中更合适在那里函数声明描述了函数的接口所属
如果我们希望C++函数能够为C 程序所用又该怎么办呢我们也可以使用extern "C"
链接指示符来使C++函数为C 程序可用例如
// 函数calc() 可以被C 程序调用
extern "C" double calc( double dparm ) { /* ... */ }
如果一个函数在同一文件中不只被声明一次则链接指示符可以出现在每个声明中它
也可以只出现在函数的第一次声明中在这种情况下第二个及以后的声明都接受第一个声
明中链接指示符指定的链接规则例如
// ---- myMath.h ----
extern "C" double calc( double );
// ---- myMath.C ----
// 在Math.h 中的calc() 的声明
#include "myMath.h"
// 定义了extern "C" calc() 函数
// calc() 可以从C 程序中被调用
double calc( double dparm ) { // ...
在本节中我们只看到为C 语言提供的链接指示extern "C" extern "C"是惟一被
保证由所有C++实现都支持的每个编译器实现都可以为其环境下常用的语言提供其他链接
指示例如extern "Ada"可以用来声明是用Ada 语言写的函数extern "FORTRAN"用来
声明是用FORTRAN 语言写的函数等等因为其他的链接指示随着具体实现的不同而不同
所以建议读者查看编译器的用户指南以获得其他链接指示符的进一步信息

- 作者: 张会鹏 2005年12月15日, 星期四 21:12  回复(0) |  引用(0) 加入博采