即使是天才,在生下来的时候的第一声啼哭,也和平常的儿童一样,决不会是一首好诗。
XSL的通俗解释
今天在网上看到了一篇文章对XSL进行了通俗易懂的解释:
XSL由两部分组成:
一是转化XML文档;二是格式化XML文档。
如果你不理解这个意思,可以这样想:XSL是一种可以将XML转化成HTML的语言,一种可以过滤和选择XML数据的语言,一种能够格式化XML数据的语言。(比如用红色显示负数。)
XSL可以被用来定义XML文档如何显示,可以将XML文档转换成能被浏览器识别的HTML文件,通常的,XSL是通过将每一个XML元素"翻译"为HTML元素,来实现这种转换的。
XSL能够向输出文件里添加新的元素,或则移动元素。XSL也能够重新排列或者索引数据,它可以检测并决定哪些元素被显示,显示多少。
创业有道 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中国搜索年会揭晓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
A Family Affair(转自互联网,关于XML)
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.
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.
When the transformation from XML to XHTML occurs at the client side, the browser requires:
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:
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.
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:
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.
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.
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.
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.
Resources |
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.
踏破铁鞋无觅处,得来全不费功夫
昨天终于解决了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中。”
原来答案就在书中,看来书看的还是不够细啊。
怎样用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);
有感于某些科技图书的翻译质量
Lighting Up on Windows Vista(转)
Lighting Up on Windows Vista10 things you can do to make your application shine when it runs on Windows Vista. Contents:1. Follow the Windows Vista style guidelines2. Enrich the user experience 3. Enable users to visualize, organize, and search 4. Run securely 5. Design for reliability and manageability 6. Establish a customer feedback loop 7. Build for connected systems 8. Bring data to the user with RSS 9. Make document data accessible 10. Build for mobility 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 guidelinesCreate 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.
Related sessions from PDC 2005
More Information2. Enrich the user experienceUse 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.
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
More Information3. Enable users to visualize, organize, and searchProvide 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:
Applications with custom file formats can integrate with the Windows Vista visualization, organization, and search functionalities through the following extensibility mechanisms:
Related sessions from PDC 2005
More Information4. Run securelyUse 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.
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
More Informationhttp://msdn.microsoft.com/windowsvista/security/ http://msdn.microsoft.com/windowsvista/building/infocard/default.aspx 5. Design for reliability and manageabilityUse 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.
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:
Related sessions from PDC 2005
More Information6. Establish a customer feedback loopUse 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.
Related sessions from PDC 2005
More Informationhttp://msdn.microsoft.com/windowsvista/reliability/#feedback 7. Build for connected systemsUse 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
More Information8. Bring data to the user with RSSUse 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 Shared Feed List (IFeeds) Automatic Download for Enclosures Related sessions from PDC 2005
More Information9. Make document data accessibleUse 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.
Related sessions from PDC 2005
More Information10. Build for mobilityUse 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.
Use Device Synch and Conflict Resolution to add robust synchronization and conflict resolution to your mobile application:
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:
Use the new power management libraries and notifications to improve battery life and allow users to continue using your application longer:
Related sessions from PDC 2005
More Information |
Top of Page
关于extern "C"(转)