goo blog サービス終了のお知らせ 

日々のDraft

回答原案集

愚痴

2009-10-22 19:50:13 | その他
俺は麺類が大好きである。ラーメンは良く食うのだが、昨日、俺がコンビニに向かった際にはレンジで温めるタイプのラーメンがなかったので、焼きそばを選択して食った。

おかしい、何かうまさが足りない、と思いつつも完食。

今さっき、部屋の中からマヨネーズが出てきた。…あ。

愚痴

2009-10-22 18:26:59 | その他
この辺の挙動はどこのブログでも大差ないんだな。

サイト内検索で<を指定している

この状態で検索するとどうなるでしょう?

===============

WordPress(OKWaveのスタッフブログはWordPressベースだって下の方に書いてある)
でも
Movable Type(やすっち。さんのScene Side Bで確認)
でも
再現するようですね

愚痴

2009-10-21 19:40:22 | その他
http://r.hatena.ne.jp/rewiz/OpenOffice.org/

経由

http://ja.openoffice.org/issues/show_bug.cgi?id=103266
http://ja.openoffice.org/issues/show_bug.cgi?id=105082

XFormsのパッチが入るまでアップデートする気はなかったけれど、テストしてみることにした。

Memo

2009-10-21 03:04:43 | その他
I often get annoyed when I saw ones, which can be seen everywhere, trying to get elements in the HTML or XML source with regular expressions.

Many of them are wrong in the the following points.
1. GREATER THAN SIGNs can appear without being escaped to numerical references or entity references.
2. Some forgot single quotation to be used as quotes for attributes. when there are DQUOTE in single quoted attribute, and GREATER THAN in the following double quoted attribute...
3. Regular expression are not useful when elements are nested.
4. CDATA and Comments
5. Well-formedness is not guaranteed.

I am likely to think that they are thoughtlessly doing so because others around them are doing so and that they have never thought of the safer way, like using DOM or SAX.

#Unfortunatly you cannot fully depend on DOM or SAX, because Java or .NET does allow strings containing most control characters, while XML does not allow them. XML DOM Core defines no exceptions for the case createTextNode is called with the strings containing control characters. Likewise, XML DOM Core does not define if createComment is called with the string "-->"

Maybe implementations are not allowed to define some implementation-dependent exceptions, and are avoiding non-well-formed XML in different way. .NET Framework throws an exception when DOM is serialized.

教えてgoo Q5380441

2009-10-19 21:52:40 | 教えてgoo
http://oshiete1.goo.ne.jp/qa5380441.html

回答をするだけなら平易なんだけど、
情報源として他のサイトからmozilla.jpをたどってみたらナレッジベースが消えてる...

#bugzilla.mozilla.orgだとちょっと敷居が高いかな。

#まぁほっといても誰かが回答つけるとは思う
========
投稿直後に回答がついたな。
…ありゃ、RFC2231は関係なかったか。
==========
んー自信ないから静観。
http://kb.mozillazine.org/Attachments_renamed

教えてgoo Q5379940

2009-10-19 18:57:04 | 教えてgoo
http://oshiete1.goo.ne.jp/qa5379940.html
http://oshiete1.goo.ne.jp/qa5374465.html
http://oshiete1.goo.ne.jp/qa5374475.html

異なる二つの話が一緒くたになっていると感じるんだよなあ…

===========
●XSLTFormsの謎。

XSLTFormsでxsd:date型の要素をxf:input要素に割り当てるとカレンダーで日付を選択できる。ただし、このカレンダー、なんと金曜日が赤い(=休日扱い)

金曜日は休日。
output要素についてはappearance属性で日付の表示書式が決められるんだけどなぁ…とは思うものの、まぁユーザーエージェントごとにレイアウトが違うこと自体を選択しているので必要悪として割り切るとするかな。

上で作った奴は日付が選択できないのではなく、範囲外の日付を入力すると×印が現れて、invalidであることが示される。この状態ではデータを送信することは出来ない。(en: I'm not sure that xf:bind constraint attribute does not prevent the value which does not meet the constraint to be set to the element, but prevents submitting data)


●当然ながら、動的に入力日付自体は当然XML Schemaで指定することはできない。また、二つの日付を指定した時に「1番目の日付が、2番目の日付よりも前にある」のような条件も無理だろうな、残念ながら。(xf:bind要素で定義している部分を再びチェックする必要がある)

invalidなデータをユーザーが送ることもできるわけで、サーバー側の処理の手を抜けるわけではない。
(en: one of the merit of XForms I think is that schemas are reusable between systems, but XML Schema cannot define a constraint that an element of xsd:date to be earlier than the following-sibling element of xsd:date with same QName, which in XForms is defined in xf:bind.This means that I have to rewrite the constraints in server side language, such as Java. otherwise I need to resend using XForms client from server to another file to check if the XML meets constraints.)


I was completely wrong. see xs:assertion

●ところで、送信後はxf:submission要素のresource属性に指定されたリソースが表示されるが、このときロケーションバーに表示されているURIは変化しなかった。(en: After the submission, uri showed by the location bar(address bar) did not change. is this behavior expected?)

どうあるべきだろう
============
Japanese Locale
Japanese locale applied Calendar

愚痴

2009-10-17 23:10:46 | その他
Add-ons may be causing problems

Minefield has determined that the following add-ons are known to cause stability or security problems

Microsoft .NET Framework Assistant 1.1 Blocked
Windows Presentation Foundation 4.0.20506.1 Blocked

These add-ons have a high risk of causing stability or security problems and have been blocked, but a restart is required to disable them completely

→Restart Minefield